[cfe-commits] r64929 - /cfe/trunk/test/Sema/format-strings.c
Chris Lattner
sabre at nondot.org
Wed Feb 18 10:25:31 PST 2009
Author: lattner
Date: Wed Feb 18 12:25:31 2009
New Revision: 64929
URL: http://llvm.org/viewvc/llvm-project?rev=64929&view=rev
Log:
add c testcase for string literal diagnostic improvement.
Modified:
cfe/trunk/test/Sema/format-strings.c
Modified: cfe/trunk/test/Sema/format-strings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings.c?rev=64929&r1=64928&r2=64929&view=diff
==============================================================================
--- cfe/trunk/test/Sema/format-strings.c (original)
+++ cfe/trunk/test/Sema/format-strings.c Wed Feb 18 12:25:31 2009
@@ -29,6 +29,9 @@
vsnprintf(buf,2,global_fmt,ap); // expected-warning {{format string is not a string literal}}
__builtin___vsnprintf_chk(buf,2,0,-1,s,ap); // no-warning
__builtin___vsnprintf_chk(buf,2,0,-1,global_fmt,ap); // expected-warning {{format string is not a string literal}}
+
+ printf("abc"
+ "%*d", (unsigned) 1, 1); // expected-warning {{field width should have type 'int'}}
}
void check_conditional_literal(const char* s, int i) {
More information about the cfe-commits
mailing list