]> granicus.if.org Git - clang/commit
Re-work the handling of implicit 'this' arguments and silly GCC-style attribute
authorChandler Carruth <chandlerc@gmail.com>
Tue, 16 Nov 2010 08:35:43 +0000 (08:35 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 16 Nov 2010 08:35:43 +0000 (08:35 +0000)
commit07d7e7a6b10f798459f350b792713db2fb3e9365
tree83eda576796ee47783debbb085a00f8105c091c1
parentf019943eda4896c1bbe584b4b0439bf6cbff62a9
Re-work the handling of implicit 'this' arguments and silly GCC-style attribute
argument indexes. This handles the offsets in a consistent manner for all of
the attributes which I saw working with these concepts. I've also added tests
for the attribute that motivated this: nonnull.

I consolidated the tests for format attributes into one file, and fleshed them
out a bit to trigger more of the warning cases. Also improved the quality of
some of the diagnostics that occur with invalid argument indices.

The only really questionable change here is supporting the implicit this
argument for the ownership attribute. I'm not sure it's really a sensible
concept there, but implemented the logic for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119339 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/SemaCXX/attr-format.cpp
test/SemaCXX/attr-nonnull.cpp [new file with mode: 0644]
test/SemaCXX/format-attribute.cpp [deleted file]