freebsd-dev/test/SemaCXX/attr-format.cpp
2009-10-14 18:03:49 +00:00

9 lines
312 B
C++

// 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)));
};