[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 11:55:12 PDT 2023


aaron.ballman added a comment.

I think you're missing changes in ASTReaderStmt.cpp and ASTWriterStmt.cpp, so serialization through modules or PCH won't work without that.



================
Comment at: clang/include/clang/AST/Expr.h:1996
   PredefinedExpr(SourceLocation L, QualType FNTy, IdentKind IK,
-                 StringLiteral *SL);
+                 bool TreatAsStringLiteral, StringLiteral *SL);
 
----------------
I think we should keep `PredefinedExpr` general, so how about `IsTransparent` instead? Then we can add a comment above `Create()` that explains what `IsTransparent` does.

(This makes it easier for us to add predefined expressions that aren't string literals but are still transparently handled.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146764/new/

https://reviews.llvm.org/D146764



More information about the cfe-commits mailing list