[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 08:20:07 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/Parse/ParseExpr.cpp:1300
   case tok::kw___PRETTY_FUNCTION__:  // primary-expression: __P..Y_F..N__ [GNU]
-    Res = Actions.ActOnPredefinedExpr(Tok.getLocation(), SavedKind);
-    ConsumeToken();
+    Res = ParsePredefinedExpression(true);
     break;
----------------
Can we instead, look at `NextToken()` and if next token is a StringLiteral or a MS predefined extension we fallthrough?
That would avoid having duplicated logic in `ParsePredefinedExpression` and `ActOnStringLiteral` which would be a nice simplification


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153914



More information about the cfe-commits mailing list