summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/PrintfFormatString.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-30 01:02:18 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-30 01:02:18 +0000
commit9ff02052ddcb06f9005eee6c137587ce72e8b0c9 (patch)
tree58eed20fb1c8029c9a921e8c01004b53c4b0eb8d /clang/lib/Analysis/PrintfFormatString.cpp
parente057403835c0eac0dccd04f22ce9faafa4c17d4c (diff)
downloadbcm5719-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.cpp3
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();
OpenPOWER on IntegriCloud