diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-30 01:02:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-30 01:02:18 +0000 |
commit | 9ff02052ddcb06f9005eee6c137587ce72e8b0c9 (patch) | |
tree | 58eed20fb1c8029c9a921e8c01004b53c4b0eb8d /clang/lib/Analysis/PrintfFormatString.cpp | |
parent | e057403835c0eac0dccd04f22ce9faafa4c17d4c (diff) | |
download | bcm5719-llvm-9ff02052ddcb06f9005eee6c137587ce72e8b0c9.tar.gz bcm5719-llvm-9ff02052ddcb06f9005eee6c137587ce72e8b0c9.zip |
Add format string checking of 'double' arguments. Fixes <rdar://problem/6931734>.
llvm-svn: 94867
Diffstat (limited to 'clang/lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | clang/lib/Analysis/PrintfFormatString.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp index 357080fa743..05b5d9cceba 100644 --- a/clang/lib/Analysis/PrintfFormatString.cpp +++ b/clang/lib/Analysis/PrintfFormatString.cpp @@ -309,6 +309,9 @@ ArgTypeResult FormatSpecifier::getArgType(ASTContext &Ctx) const { // version of ptrdiff_t? return ArgTypeResult(); } + + if (CS.isDoubleArg()) + return Ctx.DoubleTy; // FIXME: Handle other cases. return ArgTypeResult(); |