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
This commit is contained in:
Hans Wennborg
2012-02-16 16:34:54 +00:00
parent 96de9933fb
commit 9bc9bcc247
6 changed files with 25 additions and 8 deletions

View File

@@ -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: