aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/attr-format.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/attr-format.cpp b/test/SemaCXX/attr-format.cpp
new file mode 100644
index 0000000000..d1659c98de
--- /dev/null
+++ b/test/SemaCXX/attr-format.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+struct S {
+ static void f(const char*, ...) __attribute__((format(printf, 1, 2)));
+
+ // GCC has a hidden 'this' argument in member functions which is why
+ // the format argument is argument 2 here.
+ void g(const char*, ...) __attribute__((format(printf, 2, 3)));
+}; \ No newline at end of file