[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 06:09:32 PDT 2022


aaron.ballman added a comment.

In D130906#3699323 <https://reviews.llvm.org/D130906#3699323>, @inclyc wrote:

> Thank you!  I already have the commit access, I can commit this myself ^_^

Excellent! Feel free to land when you're ready. :-)



================
Comment at: clang/lib/Sema/SemaChecking.cpp:8719
     }
-
+    if (auto *SLE = maybeConstEvalStringLiteral(S.Context, E))
+      return checkFormatStringExpr(S, SLE, Args, APK, format_idx, firstDataArg,
----------------
aaron.ballman wrote:
> 
This one should still be `const Expr *` -- we only use `auto` when the type is spelled out explicitly in the initialization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130906



More information about the cfe-commits mailing list