aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/attr-format.cpp
blob: d1659c98dee52f4246ebcdd9a2c96ab26bfc2922 (plain)
1
2
3
4
5
6
7
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)));
};