diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-11-17 18:02:24 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-11-17 18:02:24 +0000 |
commit | 4a2614e94672c47395abcde60518776fbebec589 (patch) | |
tree | 793db4f94de9dd0f2c7c7ee3be9d4ed09be41f37 /test | |
parent | 24a069f5ebf441d86eaec7524365101adf6b2aeb (diff) |
Adjust format attribute index for implicit object arguments. Fixes PR5521.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaCXX/format-attribute.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/format-attribute.cpp b/test/SemaCXX/format-attribute.cpp new file mode 100644 index 0000000000..a21ebe1130 --- /dev/null +++ b/test/SemaCXX/format-attribute.cpp @@ -0,0 +1,8 @@ +// RUN: clang-cc -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}} |