scanf: parse the 'm' length modifier, and check that the right arguments

are used with that and the 'a' length modifier.

llvm-svn: 148029
This commit is contained in:
Hans Wennborg
2012-01-12 17:11:12 +00:00
parent bf3a826f2c
commit 6073e31baa
6 changed files with 63 additions and 7 deletions

View File

@@ -273,6 +273,7 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx) const {
case LengthModifier::AsPtrDiff:
return ArgTypeResult(Ctx.getPointerDiffType(), "ptrdiff_t");
case LengthModifier::AsAllocate:
case LengthModifier::AsMAllocate:
return ArgTypeResult::Invalid();
}
@@ -294,6 +295,7 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx) const {
// version of ptrdiff_t?
return ArgTypeResult();
case LengthModifier::AsAllocate:
case LengthModifier::AsMAllocate:
return ArgTypeResult::Invalid();
}