erichkeane added inline comments.

================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:8153
+
+  bool AttrHasVariadicArg = AL.hasVariadicArg();
+  unsigned AttrNumArgs = AL.getNumArgMembers();
----------------
steffenlarsen wrote:
> erichkeane wrote:
> > This still doesn't work if the VariadicExprArgument isn't last, right?  Do 
> > we ensure that is the case in clang-attr-emitter?
> Good point. I don't think there's a check as there are select few attributes 
> that use multiple variadic (`OMPDeclareSimdDecl` and `OMPDeclareVariant` are 
> the only ones, I think.)
> 
> Since I don't think it's safe to check for all, should I make a check similar 
> to the one for type/identifier arguments in attributes marked 
> `AcceptsExprPack`? Would that suffice?
I'm fine rejecting a case that has anything besides expression-arguments(and 
ones create-able from expression arguments) and limited-to-only-1-must-be-last 
variadic-expr-list in ClangAttrEmitter.

I believe we discussed that at one point, but I didn't see it here.


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

https://reviews.llvm.org/D114439

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

Reply via email to