From 9723bcf60fe6467fe4441ed136baf671323ec1ae Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 27 Feb 2009 17:58:43 +0000 Subject: When checking printf-arguments for functions with '__attribute__ ((format (printf, X, Y)))' set HasVAListArg to true when 'Y' is 0 (i.e., ignore the data arguments). This fixes . llvm-svn: 65642 --- clang/test/Sema/format-attribute.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/Sema/format-attribute.c') diff --git a/clang/test/Sema/format-attribute.c b/clang/test/Sema/format-attribute.c index ecdef9dde1a..a1cd0b84b37 100644 --- a/clang/test/Sema/format-attribute.c +++ b/clang/test/Sema/format-attribute.c @@ -24,3 +24,11 @@ struct _mystruct { }; typedef int (*f3_ptr)(char*,...) __attribute__((format(printf,1,0))); // no-error + +// +int rdar6623513(void *, const char*, const char*, ...) + __attribute__ ((format (printf, 3, 0))); + +int rdar6623513_aux(int len, const char* s) { + rdar6623513(0, "hello", "%.*s", len, s); +} -- cgit v1.2.3