aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/ScanfFormatString.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-02-16 16:34:54 +0000
committerHans Wennborg <hans@hanshq.net>2012-02-16 16:34:54 +0000
commit9bc9bcc2472373ab81a2106e5a04fc6037e19fcc (patch)
treed8dc986445c6c5448f4ba2996092abd3953ad20a /clang/lib/Analysis/ScanfFormatString.cpp
parent96de9933fbd86bd83ebf43be85c1f606f298f374 (diff)
downloadllvm-9bc9bcc2472373ab81a2106e5a04fc6037e19fcc.zip
llvm-9bc9bcc2472373ab81a2106e5a04fc6037e19fcc.tar.gz
llvm-9bc9bcc2472373ab81a2106e5a04fc6037e19fcc.tar.bz2
Format string analysis: give 'q' its own enumerator.
This is in preparation for being able to warn about 'q' and other non-standard format string features. It also allows us to print its name correctly. llvm-svn: 150697
Diffstat (limited to 'clang/lib/Analysis/ScanfFormatString.cpp')
-rw-r--r--clang/lib/Analysis/ScanfFormatString.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Analysis/ScanfFormatString.cpp b/clang/lib/Analysis/ScanfFormatString.cpp
index 5990a56..6bc4adb 100644
--- a/clang/lib/Analysis/ScanfFormatString.cpp
+++ b/clang/lib/Analysis/ScanfFormatString.cpp
@@ -210,7 +210,9 @@ ScanfArgTypeResult ScanfSpecifier::getArgType(ASTContext &Ctx) const {
return ArgTypeResult(ArgTypeResult::AnyCharTy);
case LengthModifier::AsShort: return ArgTypeResult(Ctx.ShortTy);
case LengthModifier::AsLong: return ArgTypeResult(Ctx.LongTy);
- case LengthModifier::AsLongLong: return ArgTypeResult(Ctx.LongLongTy);
+ case LengthModifier::AsLongLong:
+ case LengthModifier::AsQuad:
+ return ArgTypeResult(Ctx.LongLongTy);
case LengthModifier::AsIntMax:
return ScanfArgTypeResult(Ctx.getIntMaxType(), "intmax_t *");
case LengthModifier::AsSizeT:
@@ -236,6 +238,7 @@ ScanfArgTypeResult ScanfSpecifier::getArgType(ASTContext &Ctx) const {
case LengthModifier::AsShort: return ArgTypeResult(Ctx.UnsignedShortTy);
case LengthModifier::AsLong: return ArgTypeResult(Ctx.UnsignedLongTy);
case LengthModifier::AsLongLong:
+ case LengthModifier::AsQuad:
return ArgTypeResult(Ctx.UnsignedLongLongTy);
case LengthModifier::AsIntMax:
return ScanfArgTypeResult(Ctx.getUIntMaxType(), "uintmax_t *");