[PATCH] D147989: [clang] Fix Attribute Placement

Sam Tebbs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 06:03:01 PDT 2023


samtebbs added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:5041
   case DeclSpec::TST_enum:
     return 4;
   default:
----------------
ipriyanshi1708 wrote:
> jrtc27 wrote:
> > Why not just always pass the full DeclSpec and handle the class case here, maybe with a bool to allow other users to not need to treat enum class as different?
> Ya, we can do that too. But like GetDiagnosticTypeSpecifierID() is also called in many other places in the file so if I pass the full DeclSpec in this function will not disturb those calls?
It's probably worth doing as the other callsites just pass the `DeclSpec`'s type specifier.


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