diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-17 19:03:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-17 19:03:13 +0000 |
commit | 3fbeaea7eef240cd5131aec8465d4fbf57658df7 (patch) | |
tree | a1a0bb5408dcc9f92637d719bcc9d03eacef63bf /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | d39b8c0269f5472d1ca967c27229105755808095 (diff) | |
download | bcm5719-llvm-3fbeaea7eef240cd5131aec8465d4fbf57658df7.tar.gz bcm5719-llvm-3fbeaea7eef240cd5131aec8465d4fbf57658df7.zip |
Modified format-string checking to not emit a warning when all of the
following hold:
(1) A vprintf-like function is called that takes the argument list via a
via_list argument.
(2) The format string is a non-literal that is the parameter value of
the enclosing function, e.g:
void logmessage(const char *fmt,...) {
va_list ap;
va_start(ap,fmt);
fprintf(fmt,ap); // Do not emit a warning.
}
In the future this special case will be enhanced to consult the "format"
attribute attached to a function declaration instead of just allowing a blank
check for all function parameters to be used as format strings to vprintf-like
functions. This will happen when more support for attributes becomes
available.
llvm-svn: 45114
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions