diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-27 17:58:43 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-27 17:58:43 +0000 |
commit | 9723bcf60fe6467fe4441ed136baf671323ec1ae (patch) | |
tree | 8e488c5e54cb700be4b6ed370177059f5dea50ac /clang/test/Sema/format-attribute.c | |
parent | 96977da72c7cce3109cd787f795e586771980562 (diff) | |
download | bcm5719-llvm-9723bcf60fe6467fe4441ed136baf671323ec1ae.tar.gz bcm5719-llvm-9723bcf60fe6467fe4441ed136baf671323ec1ae.zip |
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 <rdar://problem/6623513>.
llvm-svn: 65642
Diffstat (limited to 'clang/test/Sema/format-attribute.c')
-rw-r--r-- | clang/test/Sema/format-attribute.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 + +// <rdar://problem/6623513> +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); +} |