diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-02-16 16:34:54 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-02-16 16:34:54 +0000 |
commit | 9bc9bcc2472373ab81a2106e5a04fc6037e19fcc (patch) | |
tree | d8dc986445c6c5448f4ba2996092abd3953ad20a /clang/lib/Analysis/PrintfFormatString.cpp | |
parent | 96de9933fbd86bd83ebf43be85c1f606f298f374 (diff) | |
download | bcm5719-llvm-9bc9bcc2472373ab81a2106e5a04fc6037e19fcc.tar.gz bcm5719-llvm-9bc9bcc2472373ab81a2106e5a04fc6037e19fcc.zip |
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/PrintfFormatString.cpp')
-rw-r--r-- | clang/lib/Analysis/PrintfFormatString.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp index ff0174e3c3e..e1049b3c685 100644 --- a/clang/lib/Analysis/PrintfFormatString.cpp +++ b/clang/lib/Analysis/PrintfFormatString.cpp @@ -266,7 +266,9 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx, case LengthModifier::AsChar: return ArgTypeResult::AnyCharTy; case LengthModifier::AsShort: return Ctx.ShortTy; case LengthModifier::AsLong: return Ctx.LongTy; - case LengthModifier::AsLongLong: return Ctx.LongLongTy; + case LengthModifier::AsLongLong: + case LengthModifier::AsQuad: + return Ctx.LongLongTy; case LengthModifier::AsIntMax: return ArgTypeResult(Ctx.getIntMaxType(), "intmax_t"); case LengthModifier::AsSizeT: @@ -288,7 +290,9 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx, case LengthModifier::AsChar: return Ctx.UnsignedCharTy; case LengthModifier::AsShort: return Ctx.UnsignedShortTy; case LengthModifier::AsLong: return Ctx.UnsignedLongTy; - case LengthModifier::AsLongLong: return Ctx.UnsignedLongLongTy; + case LengthModifier::AsLongLong: + case LengthModifier::AsQuad: + return Ctx.UnsignedLongLongTy; case LengthModifier::AsIntMax: return ArgTypeResult(Ctx.getUIntMaxType(), "uintmax_t"); case LengthModifier::AsSizeT: |