Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

llvm-svn: 304641
This commit is contained in:
Galina Kistanova 2017-06-03 06:23:51 +00:00
parent 83b8a6c170
commit de7e22123a
3 changed files with 4 additions and 0 deletions

View File

@ -441,6 +441,7 @@ ArgType PrintfSpecifier::getArgType(ASTContext &Ctx,
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return Ctx.IntTy;
LLVM_FALLTHROUGH;
default:
return ArgType::Invalid();
}

View File

@ -109,6 +109,7 @@ void PseudoConstantAnalysis::RunAnalysis() {
// Do not visit the children
continue;
LLVM_FALLTHROUGH;
}
case BO_AddAssign:
case BO_SubAssign:

View File

@ -341,6 +341,7 @@ ArgType ScanfSpecifier::getArgType(ASTContext &Ctx) const {
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return ArgType::PtrTo(ArgType::AnyCharTy);
LLVM_FALLTHROUGH;
default:
return ArgType::Invalid();
}
@ -357,6 +358,7 @@ ArgType ScanfSpecifier::getArgType(ASTContext &Ctx) const {
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return ArgType::PtrTo(ArgType::AnyCharTy);
LLVM_FALLTHROUGH;
default:
return ArgType::Invalid();
}