diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
| commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
| tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/SemaCXX/attr-format.cpp | |
| parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/attr-format.cpp')
| -rw-r--r-- | test/SemaCXX/attr-format.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/attr-format.cpp b/test/SemaCXX/attr-format.cpp index da134a136d26..3d5c3391c263 100644 --- a/test/SemaCXX/attr-format.cpp +++ b/test/SemaCXX/attr-format.cpp @@ -14,6 +14,8 @@ struct S { expected-error{{out of bounds}} const char* h3(const char*) __attribute__((format_arg(1))); // \ expected-error{{invalid for the implicit this argument}} + + void operator() (const char*, ...) __attribute__((format(printf, 2, 3))); }; // PR5521 @@ -33,3 +35,9 @@ namespace PR8625 { s.f(str, "%s", str); } } + +// Make sure we interpret member operator calls as having an implicit +// this argument. +void test_operator_call(S s, const char* str) { + s("%s", str); +} |
