[PATCH] D93095: Introduce -Wreserved-identifier

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 3 05:47:11 PDT 2021


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

Aside from the formatting nit and the question about the diagnostic, I think this LGTM!



================
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:637
 def KeywordAsMacro : DiagGroup<"keyword-macro">;
-def ReservedIdAsMacro : DiagGroup<"reserved-id-macro">;
 
----------------
Do we want to keep this old name around as an alias to the new name (this makes upgrades easier on users who mention the diagnostic by name in their build script or within diagnostic pragmas)?


================
Comment at: clang/lib/AST/Decl.cpp:1084
+  const IdentifierInfo *II = getIdentifier();
+  if(!II)
+    if (const auto *FD = dyn_cast<FunctionDecl>(this))
----------------
The formatting issue is worth fixing.


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

https://reviews.llvm.org/D93095



More information about the cfe-commits mailing list