[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 23 06:39:39 PDT 2023


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:2024
   if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
+    if (D->isPlaceholderVar())
+      return !VD->hasInit();
----------------
Why would we get here?  Doesn't line 1995 pick this up?  Or am I missing where D is modified?

ALSO, I'd suggest making this VD->isPlaceholderVar, as to not annoy the SA tools.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:725
 
+void Sema::NotePlaceholderVariableDefinition(SourceLocation Loc) {
+  Diag(Loc, getLangOpts().CPlusPlus26
----------------
Not a fan of this function name... Perhaps Diag instead of Note?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153536



More information about the cfe-commits mailing list