summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/format-attribute.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-11-16 08:35:43 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-11-16 08:35:43 +0000
commit743682bb9f6646f5574a6b0e152db62ba33f9e9c (patch)
tree74d5f8a0a3c708a42c05716f5197c7aa36ba2895 /clang/test/SemaCXX/format-attribute.cpp
parent4ff4654893dc48a5b906fb1c0fd36208a0052f60 (diff)
downloadbcm5719-llvm-743682bb9f6646f5574a6b0e152db62ba33f9e9c.tar.gz
bcm5719-llvm-743682bb9f6646f5574a6b0e152db62ba33f9e9c.zip
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. llvm-svn: 119339
Diffstat (limited to 'clang/test/SemaCXX/format-attribute.cpp')
-rw-r--r--clang/test/SemaCXX/format-attribute.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/test/SemaCXX/format-attribute.cpp b/clang/test/SemaCXX/format-attribute.cpp
deleted file mode 100644
index 92b7cf517ef..00000000000
--- a/clang/test/SemaCXX/format-attribute.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-// PR5521
-struct A { void a(const char*,...) __attribute((format(printf,2,3))); };
-void b(A x) {
- x.a("%d", 3);
-}
-struct X { void a(const char*,...) __attribute((format(printf,1,3))); }; // expected-error {{format argument not a string type}}
OpenPOWER on IntegriCloud