forked from OSchip/llvm-project
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
llvm-svn: 304650
This commit is contained in:
parent
0872d6c275
commit
f87496d107
|
@ -6240,6 +6240,8 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
|
||||||
S += "{objc_class=}";
|
S += "{objc_class=}";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// TODO: Double check to make sure this intentially falls through.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
case Type::ObjCInterface: {
|
case Type::ObjCInterface: {
|
||||||
|
|
|
@ -360,6 +360,7 @@ void clang::FormatASTNodeDiagnosticArgument(
|
||||||
Modifier = StringRef();
|
Modifier = StringRef();
|
||||||
Argument = StringRef();
|
Argument = StringRef();
|
||||||
// Fall through
|
// Fall through
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case DiagnosticsEngine::ak_qualtype: {
|
case DiagnosticsEngine::ak_qualtype: {
|
||||||
assert(Modifier.empty() && Argument.empty() &&
|
assert(Modifier.empty() && Argument.empty() &&
|
||||||
|
|
|
@ -424,6 +424,7 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Fall through to check the bits common with FunctionNoProtoType.
|
// Fall through to check the bits common with FunctionNoProtoType.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
case Type::FunctionNoProto: {
|
case Type::FunctionNoProto: {
|
||||||
|
|
|
@ -1576,6 +1576,7 @@ bool CastExpr::CastConsistency() const {
|
||||||
getSubExpr()->getType()->isBlockPointerType());
|
getSubExpr()->getType()->isBlockPointerType());
|
||||||
assert(getType()->getPointeeType().getAddressSpace() !=
|
assert(getType()->getPointeeType().getAddressSpace() !=
|
||||||
getSubExpr()->getType()->getPointeeType().getAddressSpace());
|
getSubExpr()->getType()->getPointeeType().getAddressSpace());
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
// These should not have an inheritance path.
|
// These should not have an inheritance path.
|
||||||
case CK_Dynamic:
|
case CK_Dynamic:
|
||||||
case CK_ToUnion:
|
case CK_ToUnion:
|
||||||
|
@ -2102,6 +2103,7 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallthrough for generic call handling.
|
// Fallthrough for generic call handling.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case CallExprClass:
|
case CallExprClass:
|
||||||
case CXXMemberCallExprClass:
|
case CXXMemberCallExprClass:
|
||||||
|
|
|
@ -736,6 +736,7 @@ namespace {
|
||||||
if (!HasFoldFailureDiagnostic)
|
if (!HasFoldFailureDiagnostic)
|
||||||
break;
|
break;
|
||||||
// We've already failed to fold something. Keep that diagnostic.
|
// We've already failed to fold something. Keep that diagnostic.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
case EM_ConstantExpression:
|
case EM_ConstantExpression:
|
||||||
case EM_PotentialConstantExpression:
|
case EM_PotentialConstantExpression:
|
||||||
case EM_ConstantExpressionUnevaluated:
|
case EM_ConstantExpressionUnevaluated:
|
||||||
|
@ -10374,6 +10375,7 @@ static ICEDiag CheckICE(const Expr* E, const ASTContext &Ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// OffsetOf falls through here.
|
// OffsetOf falls through here.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case Expr::OffsetOfExprClass: {
|
case Expr::OffsetOfExprClass: {
|
||||||
// Note that per C99, offsetof must be an ICE. And AFAIK, using
|
// Note that per C99, offsetof must be an ICE. And AFAIK, using
|
||||||
|
@ -10476,6 +10478,7 @@ static ICEDiag CheckICE(const Expr* E, const ASTContext &Ctx) {
|
||||||
return Worst(LHSResult, RHSResult);
|
return Worst(LHSResult, RHSResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case Expr::ImplicitCastExprClass:
|
case Expr::ImplicitCastExprClass:
|
||||||
case Expr::CStyleCastExprClass:
|
case Expr::CStyleCastExprClass:
|
||||||
|
|
|
@ -3785,6 +3785,7 @@ recurse:
|
||||||
Out << "v1U" << Kind.size() << Kind;
|
Out << "v1U" << Kind.size() << Kind;
|
||||||
}
|
}
|
||||||
// Fall through to mangle the cast itself.
|
// Fall through to mangle the cast itself.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
|
|
||||||
case Expr::CStyleCastExprClass:
|
case Expr::CStyleCastExprClass:
|
||||||
mangleCastExpression(E, "cv");
|
mangleCastExpression(E, "cv");
|
||||||
|
|
|
@ -290,6 +290,7 @@ NestedNameSpecifier::print(raw_ostream &OS,
|
||||||
case TypeSpecWithTemplate:
|
case TypeSpecWithTemplate:
|
||||||
OS << "template ";
|
OS << "template ";
|
||||||
// Fall through to print the type.
|
// Fall through to print the type.
|
||||||
|
LLVM_FALLTHROUGH;
|
||||||
|
|
||||||
case TypeSpec: {
|
case TypeSpec: {
|
||||||
const Type *T = getAsType();
|
const Type *T = getAsType();
|
||||||
|
|
Loading…
Reference in New Issue