opnsense-src/test/SemaCXX/format-attribute.cpp

9 lines
290 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-11-18 09:59:57 -05:00
// 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}}