summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/format-attribute.cpp
blob: 92b7cf517effea230d59cb699edb6f535427a4f6 (plain)
1
2
3
4
5
6
7
8
// RUN: %clang_cc1 -fsyntax-only -verify %s 

// 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}}
OpenPOWER on IntegriCloud