Automate attribute argument count semantic checking when there are variadic or option...
authorAaron Ballman <aaron@aaronballman.com>
Thu, 31 Jul 2014 16:37:04 +0000 (16:37 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 31 Jul 2014 16:37:04 +0000 (16:37 +0000)
commit8ed8dbd96a8de3da0213f7863de7ba3e588277f9
treece8533d130309744b87f888cc59fcca664f0a9e7
parent2628dbb214f1808ab50e9618de244a8da172db29
Automate attribute argument count semantic checking when there are variadic or optional arguments present. With this, the only time you should have to manually check attribute argument counts is when HasCustomParsing is set to true, or when you have variadic arguments that aren't really variadic (like ownership_holds and friends).

Updating the diagnostics in the launch_bounds test since they have been improved in that case. Adding a test for nonnull since it has little test coverage, but has truly variadic arguments.

llvm-svn: 214407
clang/include/clang/Sema/AttributeList.h
clang/lib/Sema/AttributeList.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/attr-nonnull.c [new file with mode: 0644]
clang/test/SemaCUDA/launch_bounds.cu
clang/utils/TableGen/ClangAttrEmitter.cpp