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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 05:44:44 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from some minor tweaks (some extra parens to remove, a spurious comment to remove).



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4359
+      llvm::find_if(Result, [this](const NamedDecl *Elem) {
+        return (isa<FieldDecl, IndirectFieldDecl>(Elem)) &&
+               Elem->isPlaceholderVar(getLangOpts());
----------------



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4370
+      break;
+    if ((isa<FieldDecl, IndirectFieldDecl>(ND)) &&
+        ND->isPlaceholderVar(getLangOpts()))
----------------



================
Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:1-2
+///////////////
+// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused -Wpre-c++26-compat %s
+
----------------



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