[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 04:42:12 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:431-436
+    if (Expr.isInvalid()) {
+      SawError = true;
+      break;
+    } else {
+      Exprs.push_back(Expr.get());
+    }
----------------
hubert.reinterpretcast wrote:
> cor3ntin wrote:
> > aaron.ballman wrote:
> > > 
> > Oups, sorry @Fznamznon, I'll fix that!
> It seems Aaron's request to move the code out of the `else` was not acted on.
Not sure what happened there, I recall doing that. I guess not, thanks!


================
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:2345
+    uint32_t Bits = 0;
+    for (uint32_t N = 0; N < Args.size(); ++N) {
+      Bits |= (isStringLiteralArgument(Args[N]) << N);
----------------
hubert.reinterpretcast wrote:
> Do we know that `Args.size()` is less than 32?
I added an assert


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156237



More information about the cfe-commits mailing list