Searched defs:HasNoCStr (Results 1 - 2 of 2) sorted by relevance

/external/clang/test/SemaCXX/
H A Dprintf-block.cpp5 class HasNoCStr { class
8 HasNoCStr(const char *s): str(s) { } function in class:HasNoCStr
14 HasNoCStr hncs(str);
17 block(n, "%s %s", hncs, n); // expected-warning{{cannot pass non-POD object of type 'HasNoCStr' to variadic block; expected type from format string was 'char *'}} expected-warning{{format specifies type 'char *' but the argument has type 'int'}}
H A Dprintf-cstr.cpp17 class HasNoCStr { class
20 HasNoCStr(const char *s): str(s) { } function in class:HasNoCStr
30 HasNoCStr hncs(str);
35 printf("%d: %s\n", n, hncs); // expected-warning{{cannot pass non-POD object of type 'HasNoCStr' to variadic function; expected type from format string was 'char *'}}
38 printf(formatString, hcs, hncs); // expected-warning{{cannot pass object of non-POD type 'HasCStr' through variadic function}} expected-warning{{cannot pass object of non-POD type 'HasNoCStr' through variadic function}}

Completed in 72 milliseconds