[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source code contains them.
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 16 19:23:29 PDT 2017
hfinkel added inline comments.
Comment at: include/clang/AST/ASTContext.h:1868
+ bool *OverrideNonnullReturn = nullptr,
+ unsigned *OverrideNonnullArgs = nullptr,
unsigned *IntegerConstantArgs = nullptr) const;
> hfinkel wrote:
> > It seems like you had to touch more code than necessary because you decided to add these parameters before IntegerConstantArgs. Why don't you add them afterward instead?
> It seemed more natural.... But I'm happy to change the order. I'm not worreid about how much code I have to touch, I'd rather just get the options in the right place. What order would you suggest?
I suggest the other order because it is more common to want the IntegerConstantArgs than the nonnull args (which essentially only one caller wants).
More information about the cfe-commits