[PATCH] D147989: [clang] Fix Attribute Placement

Sam Tebbs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 05:49:30 PDT 2023


samtebbs added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:5051
+        return 5;
+      else
+        return 4;
----------------
Instead of returning 4 here, I think it's best to just delegate to the other `GetDiagnosticTypeSpecifierID` function. That way, if the IDs change for whatever reason they only have to updated in one place. This could be done cleanly by just making the call below be at the top level of the function (i.e. not inside an `else` block).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147989



More information about the cfe-commits mailing list