aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed.
This should also have a release note, eventually. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:3586-3591 + // MSVC treats all predefined expressions as string literals rather than char + // arrays. + if (LangOpts.MicrosoftExt) + return SL; + return PredefinedExpr::Create(Context, Loc, ResTy, IK, SL); ---------------- This is incorrect -- these are still predefined expressions even if they're a string literal. Otherwise, we lose AST fidelity and things like the `predefinedExpr()` AST matcher don't work (https://github.com/llvm/llvm-project/blob/main/clang/include/clang/ASTMatchers/ASTMatchers.h#L2697), and `-ast-print` will print the wrong thing (https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/StmtPrinter.cpp#L1248). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146764/new/ https://reviews.llvm.org/D146764 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits