mboehme marked an inline comment as done.
mboehme added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:4633-4637
 Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS,
                                  RecordDecl *&AnonRecord) {
-  return ParsedFreeStandingDeclSpec(S, AS, DS, MultiTemplateParamsArg(), false,
+  return ParsedFreeStandingDeclSpec(S, AS, DS, ParsedAttributesView::none(),
+                                    MultiTemplateParamsArg(), false,
                                     AnonRecord);
----------------
aaron.ballman wrote:
> It's surprising that we don't need to update this interface as well; is that 
> inconsistency desired?
This is OK because every caller of this overload happens to do 
`ProhibitAttributes(DeclAttrs)`.

But now that you bring this up, I realize that this is risky. What if we add 
another caller in the future that doesn’t do `ProhibitAttribubtes(DeclAttrs)`? 
And even in the current situation, I think it makes sense to be explicit that 
we’re passing an empty list of attributes.

So I’ve added the `DeclAttrs` parameter to this function too, and now pass 
`ParsedAttributesView::none()` at the callsites.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128499

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to