Reland [clang] Make predefined expressions string literals under -fms-extensions
authorArthur Eubanks <aeubanks@google.com>
Sun, 7 May 2023 18:24:48 +0000 (11:24 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 10 May 2023 17:54:58 +0000 (10:54 -0700)
commit878e590503dff0d9097e91c2bec4409f14503b82
tree10968242c1fb75548b79cdca18cbe06cd948573f
parent2e2e1104641b2108774d38bf6e85f756a7cf9567
Reland [clang] Make predefined expressions string literals under -fms-extensions

MSVC makes these string literals [1][2].

[1] https://godbolt.org/z/6vnTzbExx
[2] https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170

Fixes #114

Initial commit didn't check if there was a function name when stepping through expressions ignoring parens.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D146764
15 files changed:
clang/docs/ReleaseNotes.rst
clang/include/clang/AST/Expr.h
clang/include/clang/AST/IgnoreExpr.h
clang/include/clang/AST/Stmt.h
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/Expr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaInit.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp
clang/test/Modules/predefined.cpp [new file with mode: 0644]
clang/test/Sema/ms_predefined_expr.cpp [new file with mode: 0644]
clang/test/SemaCXX/predefined-expr-msvc.cpp [new file with mode: 0644]