With C++17 there is no Clang pedantic warning or MSVC C5051.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D131346
case TSK_ExplicitInstantiationDefinition:
if (!DumpExplicitInst)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case TSK_Undeclared:
case TSK_ImplicitInstantiation:
if (DumpRefOnly)
}
}
// Pass through.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMF_retain:
case OMF_release:
if (E->getReceiverKind() == ObjCMessageExpr::Instance)
return;
case Range_Contains:
RI->End = newRange.End;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Range_ExtendsBegin:
newRange.End = RI->End;
Removals.erase(RI);
Out << "...}";
return;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
getArrayInitializedElt(I).printPretty(Out, Policy, ElemTy, Ctx);
}
case EST_Unparsed: case EST_Unevaluated: case EST_Uninstantiated:
// We don't know yet. It shouldn't matter what we pick here; no-one
// should ever look at this.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case EST_None: case EST_MSAny: case EST_NoexceptFalse:
CanonicalEPI.ExceptionSpec.Type = EST_None;
break;
return;
}
// TODO: Double check to make sure this intentionally falls through.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Type::ObjCInterface: {
Modifier = StringRef();
Argument = StringRef();
// Fall through
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case DiagnosticsEngine::ak_qualtype: {
assert(Modifier.empty() && Argument.empty() &&
case TSK_ExplicitInstantiationDefinition:
if (!DumpExplicitInst)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case TSK_Undeclared:
case TSK_ImplicitInstantiation:
if (DumpRefOnly)
return false;
// Fall through to check the bits common with FunctionNoProtoType.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Type::FunctionNoProto: {
TemplateKind = TemplateSpecialization;
TemplateParameters = VTD->getTemplateParameters();
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Decl::Field:
case Decl::EnumConstant:
case Decl::ObjCIvar:
case APValue::Int:
if (!Value.getInt().needsCleanup())
return ConstantExpr::RSK_Int64;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return ConstantExpr::RSK_APValue;
}
}
// Fallthrough for generic call handling.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case CallExprClass:
case CXXMemberCallExprClass:
DCE->getCastKind() == CK_Dynamic)
return true;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ImplicitCastExprClass:
case CStyleCastExprClass:
case CXXStaticCastExprClass:
switch (Kind) {
case LCK_StarThis:
Bits |= Capture_ByCopy;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LCK_This:
assert(!Var && "'this' capture cannot have a variable!");
Bits |= Capture_This;
case LCK_ByCopy:
Bits |= Capture_ByCopy;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LCK_ByRef:
assert(Var && "capture must have a variable!");
break;
if (!HasFoldFailureDiagnostic)
break;
// We've already failed to fold something. Keep that diagnostic.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case EM_ConstantExpression:
case EM_ConstantExpressionUnevaluated:
setActiveDiagnostic(false);
<< (std::string("'") + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'");
else
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_strchr:
case Builtin::BI__builtin_wcschr:
case Builtin::BI__builtin_memchr:
Desired))
return ZeroInitialization(E);
StopAtNull = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BImemchr:
case Builtin::BI__builtin_memchr:
case Builtin::BI__builtin_char_memchr:
case Builtin::BIwcschr:
case Builtin::BI__builtin_wcschr:
StopAtNull = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BIwmemchr:
case Builtin::BI__builtin_wmemchr:
// wcschr and wmemchr are given a wchar_t to look for. Just use it.
<< (std::string("'") + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'");
else
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_memcpy:
case Builtin::BI__builtin_memmove:
case Builtin::BI__builtin_wmemcpy:
<< (std::string("'") + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'");
else
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_strlen:
case Builtin::BI__builtin_wcslen: {
// As an extension, we support __builtin_strlen() as a constant expression,
<< (std::string("'") + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'");
else
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_strcmp:
case Builtin::BI__builtin_wcscmp:
case Builtin::BI__builtin_strncmp:
break;
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LengthModifier::AsChar:
case LengthModifier::AsLongLong:
case LengthModifier::AsQuad:
if (!MD->isStatic())
Arity++;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclarationName::CXXConversionFunctionName:
case DeclarationName::CXXLiteralOperatorName:
mangleOperatorName(Name, Arity);
Out << 'E';
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case UETT_AlignOf:
Out << 'a';
MangleAlignofSizeofArg();
case TypeSpecWithTemplate:
OS << "template ";
// Fall through to print the type.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case TypeSpec: {
const auto *Record =
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return Ctx.IntTy;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return ArgType::Invalid();
}
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return ArgType::PtrTo(ArgType::AnyCharTy);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return ArgType::Invalid();
}
case LengthModifier::AsShort:
if (Ctx.getTargetInfo().getTriple().isOSMSVCRT())
return ArgType::PtrTo(ArgType::AnyCharTy);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return ArgType::Invalid();
}
LeftMost = Cur;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case FunctionNoProto:
case ConstantArray:
case DependentSizedArray:
// `id` and `id<...>` have no star location.
if (Cur.castAs<ObjCObjectPointerTypeLoc>().getStarLoc().isInvalid())
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Pointer:
case BlockPointer:
case MemberPointer:
case Type::VariableArray:
case Type::DependentSizedArray:
NeedARCStrongQualifier = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Type::ConstantArray:
case Type::IncompleteArray:
// We care about logical not only if we care about comparisons.
if (!ShouldRetrieveFromComparisons)
return nullptr;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// Function pointer/references can be dereferenced before a call.
// That doesn't make it, however, any different from a regular call.
// For this reason, dereference operation is a "no-op".
return isConfigurationValue(cast<DeclRefExpr>(S)->getDecl(), PP);
case Stmt::ObjCBoolLiteralExprClass:
IgnoreYES_NO = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Stmt::CXXBoolLiteralExprClass:
case Stmt::IntegerLiteralClass: {
const Expr *E = cast<Expr>(S);
case OO_LessLessEqual:
case OO_GreaterGreaterEqual:
checkAccess(OE->getArg(1), AK_Read);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OO_PlusPlus:
case OO_MinusMinus:
checkAccess(OE->getArg(0), AK_Written);
// Grrr. operator* can be multiplication...
checkPtAccess(OE->getArg(0), AK_Read);
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default: {
// TODO: get rid of this, and rely on pass-by-ref instead.
const Expr *Obj = OE->getArg(0);
case ')':
--InParentheses;
assert(InParentheses >= 0 && "Parentheses are not in pair");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case '|':
case ',':
if (InParentheses == 0) {
case UnsignedChar:
if (getCharWidth() < getIntWidth())
return "";
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case UnsignedShort:
if (getShortWidth() < getIntWidth())
return "";
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case UnsignedInt: return "U";
case UnsignedLong: return "UL";
case UnsignedLongLong: return "ULL";
Features["dot5-insts"] = true;
Features["dot6-insts"] = true;
Features["dot7-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX1013:
case GK_GFX1010:
Features["dl-insts"] = true;
case GK_GFX940:
Features["gfx940-insts"] = true;
Features["fp8-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX90A:
Features["gfx90a-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX908:
Features["dot3-insts"] = true;
Features["dot4-insts"] = true;
Features["dot5-insts"] = true;
Features["dot6-insts"] = true;
Features["mai-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX906:
Features["dl-insts"] = true;
Features["dot1-insts"] = true;
Features["dot2-insts"] = true;
Features["dot7-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX90C:
case GK_GFX909:
case GK_GFX904:
case GK_GFX902:
case GK_GFX900:
Features["gfx9-insts"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX810:
case GK_GFX805:
case GK_GFX803:
Features["16-bit-insts"] = true;
Features["dpp"] = true;
Features["s-memrealtime"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX705:
case GK_GFX704:
case GK_GFX703:
case GK_GFX700:
Features["ci-insts"] = true;
Features["flat-address-space"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GK_GFX602:
case GK_GFX601:
case GK_GFX600:
case llvm::Triple::x86:
case llvm::Triple::x86_64:
this->HasFloat128 = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
this->MCountName = "__mcount";
break;
// Don't use floating point registers on soft float ABI.
if (FloatABI == SoftFloat)
return false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'b': // Base register
Info.setAllowsRegister();
break;
case 'Q': // Memory operand that is an offset from a register (it is
// usually better to use `m' or `es' in asm statements)
Info.setAllowsRegister();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'Z': // Memory operand that is an indexed or indirect from a
// register (it is usually better to use `m' or `es' in
// asm statements)
case 'T': // Likewise, plus an index
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'a': // Address register
case 'd': // Data register (equivalent to 'r')
case 'f': // Floating-point register
switch (Level) {
case RelaxedSIMD:
Features["relaxed-simd"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SIMD128:
Features["simd128"] = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NoSIMD:
break;
}
case NoSIMD:
case SIMD128:
Features["simd128"] = false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case RelaxedSIMD:
Features["relaxed-simd"] = false;
break;
case CK_PentiumMMX:
Builder.defineMacro("__pentium_mmx__");
Builder.defineMacro("__tune_pentium_mmx__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_i586:
case CK_Pentium:
defineCPUMacros(Builder, "i586");
case CK_Pentium3:
case CK_PentiumM:
Builder.defineMacro("__tune_pentium3__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_Pentium2:
case CK_C3_2:
Builder.defineMacro("__tune_pentium2__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_PentiumPro:
case CK_i686:
defineCPUMacros(Builder, "i686");
case CK_K6_2:
Builder.defineMacro("__k6_2__");
Builder.defineMacro("__tune_k6_2__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_K6_3:
if (CPU != CK_K6_2) { // In case of fallthrough
// FIXME: GCC may be enabling these in cases where some other k6
Builder.defineMacro("__k6_3__");
Builder.defineMacro("__tune_k6_3__");
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_K6:
defineCPUMacros(Builder, "k6");
break;
switch (XOPLevel) {
case XOP:
Builder.defineMacro("__XOP__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case FMA4:
Builder.defineMacro("__FMA4__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE4A:
Builder.defineMacro("__SSE4A__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NoXOP:
break;
}
switch (SSELevel) {
case AVX512F:
Builder.defineMacro("__AVX512F__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AVX2:
Builder.defineMacro("__AVX2__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AVX:
Builder.defineMacro("__AVX__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE42:
Builder.defineMacro("__SSE4_2__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE41:
Builder.defineMacro("__SSE4_1__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSSE3:
Builder.defineMacro("__SSSE3__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE3:
Builder.defineMacro("__SSE3__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE2:
Builder.defineMacro("__SSE2__");
Builder.defineMacro("__SSE2_MATH__"); // -mfp-math=sse always implied.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SSE1:
Builder.defineMacro("__SSE__");
Builder.defineMacro("__SSE_MATH__"); // -mfp-math=sse always implied.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NoSSE:
break;
}
switch (MMX3DNowLevel) {
case AMD3DNowAthlon:
Builder.defineMacro("__3dNOW_A__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AMD3DNow:
Builder.defineMacro("__3dNOW__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case MMX:
Builder.defineMacro("__MMX__");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NoMMX3DNow:
break;
}
// to the next constraint.
return std::string("^") + std::string(Constraint++, 2);
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return std::string(1, *Constraint);
}
case AtomicExpr::AO__atomic_add_fetch:
PostOp = E->getValueType()->isFloatingType() ? llvm::Instruction::FAdd
: llvm::Instruction::Add;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_add:
case AtomicExpr::AO__hip_atomic_fetch_add:
case AtomicExpr::AO__opencl_atomic_fetch_add:
case AtomicExpr::AO__atomic_sub_fetch:
PostOp = E->getValueType()->isFloatingType() ? llvm::Instruction::FSub
: llvm::Instruction::Sub;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_sub:
case AtomicExpr::AO__opencl_atomic_fetch_sub:
case AtomicExpr::AO__atomic_fetch_sub:
case AtomicExpr::AO__atomic_min_fetch:
PostOpMinMax = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_min:
case AtomicExpr::AO__hip_atomic_fetch_min:
case AtomicExpr::AO__opencl_atomic_fetch_min:
case AtomicExpr::AO__atomic_max_fetch:
PostOpMinMax = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_max:
case AtomicExpr::AO__hip_atomic_fetch_max:
case AtomicExpr::AO__opencl_atomic_fetch_max:
case AtomicExpr::AO__atomic_and_fetch:
PostOp = llvm::Instruction::And;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_and:
case AtomicExpr::AO__hip_atomic_fetch_and:
case AtomicExpr::AO__opencl_atomic_fetch_and:
case AtomicExpr::AO__atomic_or_fetch:
PostOp = llvm::Instruction::Or;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_or:
case AtomicExpr::AO__hip_atomic_fetch_or:
case AtomicExpr::AO__opencl_atomic_fetch_or:
case AtomicExpr::AO__atomic_xor_fetch:
PostOp = llvm::Instruction::Xor;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_xor:
case AtomicExpr::AO__hip_atomic_fetch_xor:
case AtomicExpr::AO__opencl_atomic_fetch_xor:
case AtomicExpr::AO__atomic_nand_fetch:
PostOp = llvm::Instruction::And; // the NOT is special cased below
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_nand:
case AtomicExpr::AO__atomic_fetch_nand:
Op = llvm::AtomicRMWInst::Nand;
EmitStoreOfScalar(Val1Scalar, MakeAddrLValue(Temp, Val1Ty));
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__atomic_fetch_add:
case AtomicExpr::AO__atomic_fetch_sub:
case AtomicExpr::AO__atomic_add_fetch:
case AtomicExpr::AO__atomic_sub_fetch:
ShouldCastToIntPtrTy = !MemTy->isFloatingType();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_store:
case AtomicExpr::AO__c11_atomic_exchange:
// suitably aligned for the optimized version.
if (Misaligned)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_load:
case AtomicExpr::AO__c11_atomic_store:
case AtomicExpr::AO__c11_atomic_exchange:
// T __atomic_fetch_add_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_add_fetch:
PostOp = llvm::Instruction::Add;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_add:
case AtomicExpr::AO__opencl_atomic_fetch_add:
case AtomicExpr::AO__atomic_fetch_add:
// T __atomic_fetch_and_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_and_fetch:
PostOp = llvm::Instruction::And;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_and:
case AtomicExpr::AO__opencl_atomic_fetch_and:
case AtomicExpr::AO__hip_atomic_fetch_and:
// T __atomic_fetch_or_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_or_fetch:
PostOp = llvm::Instruction::Or;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_or:
case AtomicExpr::AO__opencl_atomic_fetch_or:
case AtomicExpr::AO__hip_atomic_fetch_or:
// T __atomic_fetch_sub_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_sub_fetch:
PostOp = llvm::Instruction::Sub;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_sub:
case AtomicExpr::AO__opencl_atomic_fetch_sub:
case AtomicExpr::AO__atomic_fetch_sub:
// T __atomic_fetch_xor_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_xor_fetch:
PostOp = llvm::Instruction::Xor;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_xor:
case AtomicExpr::AO__opencl_atomic_fetch_xor:
case AtomicExpr::AO__hip_atomic_fetch_xor:
break;
case AtomicExpr::AO__atomic_min_fetch:
PostOpMinMax = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_min:
case AtomicExpr::AO__atomic_fetch_min:
case AtomicExpr::AO__hip_atomic_fetch_min:
break;
case AtomicExpr::AO__atomic_max_fetch:
PostOpMinMax = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_max:
case AtomicExpr::AO__atomic_fetch_max:
case AtomicExpr::AO__hip_atomic_fetch_max:
// T __atomic_fetch_nand_N(T *mem, T val, int order)
case AtomicExpr::AO__atomic_nand_fetch:
PostOp = llvm::Instruction::And; // the NOT is special cased below
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case AtomicExpr::AO__c11_atomic_fetch_nand:
case AtomicExpr::AO__atomic_fetch_nand:
LibCallName = "__atomic_fetch_nand";
EmitLifetimeEnd(TmpSize, TmpPtr);
return Call;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
// OpenCL v2.0 s6.13.17.6 - Kernel query functions need bitcast of block
// parameter.
case NEON::BI__builtin_neon_vcalt_v:
case NEON::BI__builtin_neon_vcaltq_v:
std::swap(Ops[0], Ops[1]);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vcage_v:
case NEON::BI__builtin_neon_vcageq_v:
case NEON::BI__builtin_neon_vcagt_v:
int Indices[] = {1 - Lane, Lane};
return Builder.CreateShuffleVector(Ops[1], Ld, Indices, "vld1q_lane");
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vld1_lane_v: {
Ops[1] = Builder.CreateBitCast(Ops[1], Ty);
PtrOp0 = Builder.CreateElementBitCast(PtrOp0, VTy->getElementType());
case NEON::BI__builtin_neon_vsri_n_v:
case NEON::BI__builtin_neon_vsriq_n_v:
rightShift = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vsli_n_v:
case NEON::BI__builtin_neon_vsliq_n_v:
Ops[2] = EmitNeonShiftVector(Ops[2], Ty, rightShift);
return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_neon_vst1,
Tys), Ops);
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vst1_lane_v: {
Ops[1] = Builder.CreateBitCast(Ops[1], Ty);
Ops[1] = Builder.CreateExtractElement(Ops[1], Ops[2]);
case NEON::BI__builtin_neon_vcvts_f32_u32:
case NEON::BI__builtin_neon_vcvtd_f64_u64:
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vcvts_f32_s32:
case NEON::BI__builtin_neon_vcvtd_f64_s64: {
Ops.push_back(EmitScalarExpr(E->getArg(0)));
case NEON::BI__builtin_neon_vcvth_f16_u32:
case NEON::BI__builtin_neon_vcvth_f16_u64:
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vcvth_f16_s16:
case NEON::BI__builtin_neon_vcvth_f16_s32:
case NEON::BI__builtin_neon_vcvth_f16_s64: {
case NEON::BI__builtin_neon_vaddv_u8:
// FIXME: These are handled by the AArch64 scalar code.
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vaddv_s8: {
Int = usgn ? Intrinsic::aarch64_neon_uaddv : Intrinsic::aarch64_neon_saddv;
Ty = Int32Ty;
}
case NEON::BI__builtin_neon_vaddv_u16:
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vaddv_s16: {
Int = usgn ? Intrinsic::aarch64_neon_uaddv : Intrinsic::aarch64_neon_saddv;
Ty = Int32Ty;
}
case NEON::BI__builtin_neon_vaddvq_u8:
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vaddvq_s8: {
Int = usgn ? Intrinsic::aarch64_neon_uaddv : Intrinsic::aarch64_neon_saddv;
Ty = Int32Ty;
}
case NEON::BI__builtin_neon_vaddvq_u16:
usgn = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NEON::BI__builtin_neon_vaddvq_s16: {
Int = usgn ? Intrinsic::aarch64_neon_uaddv : Intrinsic::aarch64_neon_saddv;
Ty = Int32Ty;
default: break;
case clang::X86::BI__builtin_ia32_vfmsubph512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddph512_mask:
case clang::X86::BI__builtin_ia32_vfmaddph512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddph512_mask3:
break;
case clang::X86::BI__builtin_ia32_vfmsubaddph512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddsubph512_mask:
case clang::X86::BI__builtin_ia32_vfmaddsubph512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddsubph512_mask3:
break;
case clang::X86::BI__builtin_ia32_vfmsubps512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddps512_mask:
case clang::X86::BI__builtin_ia32_vfmaddps512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddps512_mask3:
IID = llvm::Intrinsic::x86_avx512_vfmadd_ps_512; break;
case clang::X86::BI__builtin_ia32_vfmsubpd512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddpd512_mask:
case clang::X86::BI__builtin_ia32_vfmaddpd512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddpd512_mask3:
IID = llvm::Intrinsic::x86_avx512_vfmadd_pd_512; break;
case clang::X86::BI__builtin_ia32_vfmsubaddps512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddsubps512_mask:
case clang::X86::BI__builtin_ia32_vfmaddsubps512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddsubps512_mask3:
break;
case clang::X86::BI__builtin_ia32_vfmsubaddpd512_mask3:
Subtract = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case clang::X86::BI__builtin_ia32_vfmaddsubpd512_mask:
case clang::X86::BI__builtin_ia32_vfmaddsubpd512_maskz:
case clang::X86::BI__builtin_ia32_vfmaddsubpd512_mask3:
case X86::BI__builtin_ia32_cmppd256_mask:
case X86::BI__builtin_ia32_cmppd512_mask:
IsMaskFCmp = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case X86::BI__builtin_ia32_cmpps:
case X86::BI__builtin_ia32_cmpps256:
case X86::BI__builtin_ia32_cmppd:
}
case X86::BI__builtin_ia32_vfcmaddcph512_mask:
IsConjFMA = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case X86::BI__builtin_ia32_vfmaddcph512_mask: {
Intrinsic::ID IID = IsConjFMA
? Intrinsic::x86_avx512fp16_mask_vfcmadd_cph_512
}
case X86::BI__builtin_ia32_vfcmaddcsh_round_mask:
IsConjFMA = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case X86::BI__builtin_ia32_vfmaddcsh_round_mask: {
Intrinsic::ID IID = IsConjFMA ? Intrinsic::x86_avx512fp16_mask_vfcmadd_csh
: Intrinsic::x86_avx512fp16_mask_vfmadd_csh;
}
case X86::BI__builtin_ia32_vfcmaddcsh_round_mask3:
IsConjFMA = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case X86::BI__builtin_ia32_vfmaddcsh_round_mask3: {
Intrinsic::ID IID = IsConjFMA ? Intrinsic::x86_avx512fp16_mask_vfcmadd_csh
: Intrinsic::x86_avx512fp16_mask_vfmadd_csh;
RetAttrs.addAttribute(llvm::Attribute::SExt);
else
RetAttrs.addAttribute(llvm::Attribute::ZExt);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ABIArgInfo::Direct:
if (RetAI.getInReg())
RetAttrs.addAttribute(llvm::Attribute::InReg);
Attrs.addAttribute(llvm::Attribute::SExt);
else
Attrs.addAttribute(llvm::Attribute::ZExt);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ABIArgInfo::Direct:
if (ArgNo == 0 && FI.isChainCall())
Attrs.addAttribute(llvm::Attribute::Nest);
Builder.CreateStore(elt, eltAddr);
}
// FALLTHROUGH
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case ABIArgInfo::InAlloca:
}
// Fallthrough: act like we're in the base variant.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Dtor_Base:
assert(Body);
CGM.Error(E->getBeginLoc(), "this builtin expect that __builtin_coro_id has"
" been used earlier in this function");
// Fallthrough to the next case to add TokenNone as the first argument.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
// @llvm.coro.suspend takes a token parameter. Add token 'none' as the first
// argument.
// them distinct if they are ODR-uniqued.
if (Identifier.empty())
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case llvm::dwarf::DW_TAG_structure_type:
case llvm::dwarf::DW_TAG_union_type:
// If D is pseudo-strong, treat it like __unsafe_unretained here. This means
// that we omit the retain, and causes non-autoreleased return values to be
// immediately released.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Qualifiers::OCL_ExplicitNone:
case ObjCRuntime::GNUstep:
if (L.ObjCRuntime.getVersion() >= VersionTuple(1, 7))
return EHPersonality::GNUstep_ObjC;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ObjCRuntime::GCC:
case ObjCRuntime::ObjFW:
if (L.hasSjLjExceptions())
return;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CK_NoOp:
case CXXConstructExpr::CK_VirtualBase:
ForVirtualBase = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CXXConstructExpr::CK_NonVirtualBase:
Type = Ctor_Base;
case LangOptions::SOB_Undefined:
if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow))
return Builder.CreateNSWMul(Ops.LHS, Ops.RHS, "mul");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LangOptions::SOB_Trapping:
if (CanElideOverflowCheck(CGF.getContext(), Ops))
return Builder.CreateNSWMul(Ops.LHS, Ops.RHS, "mul");
case LangOptions::SOB_Undefined:
if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow))
return Builder.CreateNSWAdd(InVal, Amount, Name);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LangOptions::SOB_Trapping:
if (!E->canOverflow())
return Builder.CreateNSWAdd(InVal, Amount, Name);
case LangOptions::SOB_Undefined:
if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow))
return Builder.CreateNSWAdd(op.LHS, op.RHS, "add");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LangOptions::SOB_Trapping:
if (CanElideOverflowCheck(CGF.getContext(), op))
return Builder.CreateNSWAdd(op.LHS, op.RHS, "add");
case LangOptions::SOB_Undefined:
if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow))
return Builder.CreateNSWSub(op.LHS, op.RHS, "sub");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LangOptions::SOB_Trapping:
if (CanElideOverflowCheck(CGF.getContext(), op))
return Builder.CreateNSWSub(op.LHS, op.RHS, "sub");
switch (paramDecl->getType().getQualifiers().getObjCLifetime()) {
case Qualifiers::OCL_Strong:
exn = CGF.EmitARCRetainNonBlock(exn);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Qualifiers::OCL_None:
case Qualifiers::OCL_ExplicitNone:
switch (CFRuntime) {
default: break;
- case LangOptions::CoreFoundationABI::Swift: LLVM_FALLTHROUGH;
+ case LangOptions::CoreFoundationABI::Swift: [[fallthrough]];
case LangOptions::CoreFoundationABI::Swift5_0:
CFConstantStringClassName =
Triple.isOSDarwin() ? "$s15SwiftFoundation19_NSCFConstantStringCN"
TSK_ExplicitInstantiationDefinition &&
Spec->hasDefinition())
DI->completeTemplateDefinition(*Spec);
- } LLVM_FALLTHROUGH;
+ } [[fallthrough]];
case Decl::CXXRecord: {
CXXRecordDecl *CRD = cast<CXXRecordDecl>(D);
if (CGDebugInfo *DI = getModuleDebugInfo()) {
}
assert(isa<ObjCInterfaceType>(Ty));
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Type::ObjCInterface:
if (cast<ObjCInterfaceType>(Ty)->getDecl()->getSuperClass()) {
switch (CatchType.getQualifiers().getObjCLifetime()) {
case Qualifiers::OCL_Strong:
CastExn = CGF.EmitARCRetainNonBlock(CastExn);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Qualifiers::OCL_None:
case Qualifiers::OCL_ExplicitNone:
if (PP.getSourceManager().isWrittenInCommandLineFile(Loc))
return;
updateStatusToNextScope();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CommandLineIncludeScope:
EnteredCommandLineIncludeFiles++;
break;
return false;
++StmtsToSkip;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Stmt::GotoStmtClass:
FromScopes.push_back({S, ParentScope});
case llvm::Triple::thumbeb:
if (Triple.isAndroid())
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
case llvm::Triple::mips:
// If -Ofast is the optimization level, then -ffast-math should be enabled
if (!OFastEnabled)
continue;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case options::OPT_ffast_math:
HonorINFs = false;
HonorNaNs = false;
case llvm::Triple::armeb:
case llvm::Triple::thumbeb:
IsBigEndian = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case llvm::Triple::arm:
case llvm::Triple::thumb:
if (Arg *A = Args.getLastArg(options::OPT_mlittle_endian,
default:
D.Diag(clang::diag::err_target_unsupported_arch)
<< Triple.getArchName() << "myriad";
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case llvm::Triple::shave:
return;
case llvm::Triple::sparc:
case NSAPI::NSNumberWithUnsignedInt:
case NSAPI::NSNumberWithUnsignedInteger:
CallIsUnsigned = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NSAPI::NSNumberWithInt:
case NSAPI::NSNumberWithInteger:
break;
case NSAPI::NSNumberWithUnsignedLong:
CallIsUnsigned = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NSAPI::NSNumberWithLong:
CallIsLong = true;
break;
case NSAPI::NSNumberWithUnsignedLongLong:
CallIsUnsigned = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NSAPI::NSNumberWithLongLong:
CallIsLongLong = true;
break;
case NSAPI::NSNumberWithDouble:
CallIsDouble = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NSAPI::NSNumberWithFloat:
CallIsFloating = true;
break;
Fragments.append("template", DeclarationFragments::FragmentKind::Keyword);
Fragments.appendSpace();
// Fallthrough after adding the keyword to handle the actual type.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case NestedNameSpecifier::TypeSpec: {
const Type *T = NNS->getAsType();
// the same as a single LF.
if (i + 1 < e && Text[i + 1] == '\n')
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case '\n':
++FormatTok->NewlinesBefore;
if (!InEscape)
CurrentToken->isOneOf(tok::kw_constexpr, tok::identifier)) {
next();
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_while:
if (CurrentToken && CurrentToken->is(tok::l_paren)) {
next();
break;
}
// Else, if it is 'default:', fall through to the case handling.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case tok::kw_case:
if (Style.isVerilog() ||
}
if (handleCppAttributes())
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
ParseDefault();
break;
case tok::identifier:
if (!Tok->is(TT_StatementMacro))
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::at:
case tok::semi:
case tok::kw_if:
if (!Style.isCpp())
break;
// Handle C++ "(inline|export) namespace".
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_inline:
nextToken();
if (FormatTok->is(tok::kw_namespace)) {
addUnwrappedLine();
return;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_struct:
case tok::kw_union:
if (parseStructLike())
case tok::ampamp:
if (AmpAmpTokenType != TT_Unknown)
FormatTok->setFinalizedType(AmpAmpTokenType);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
nextToken();
break;
<< Module->Name << Locked.getErrorMessage();
// Clear out any potential leftover.
Locked.unsafeRemoveLockFile();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case llvm::LockFileManager::LFS_Owned:
// We're responsible for building the module ourselves.
return compileModuleAndReadASTImpl(ImportingInstance, ImportLoc,
diag::warn_module_config_mismatch)
<< ModuleFilename;
// Fall through to error out.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ASTReader::VersionMismatch:
case ASTReader::HadErrors:
ModuleLoader::HadFatalFailure = true;
consumeError(std::move(Err));
return SDError::MalformedMetadataBlock;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Cursor::BlockEnd:
if (!VersionChecked)
return SDError::MissingVersion;
case TemplateArgument::TemplateExpansion:
Out << 'P'; // pack expansion of...
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case TemplateArgument::Template:
VisitTemplateName(Arg.getAsTemplateOrTemplatePattern());
break;
CI.getFrontendOpts().ProgramAction);
return Act;
case frontend::ASTDump:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::ASTPrint:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::ParseSyntaxOnly:
Act = CreateFrontendAction(CI);
break;
case frontend::PluginAction:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::EmitAssembly:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::EmitBC:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::EmitObj:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::PrintPreprocessedInput:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case frontend::EmitLLVMOnly:
Act.reset(new EmitLLVMOnlyAction(&LLVMCtx));
break;
case llvm::Triple::Win32:
if (triple.getEnvironment() != llvm::Triple::Cygnus)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
// FIXME: temporary hack: hard-coded paths.
AddPath("/usr/local/include", System, false);
break;
}
// FALL THROUGH.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case '\r':
case '\n':
// Okay, we found the end of the line. First, back up past the \0, \r, \n.
case '\r':
if (CurPtr[0] == '\n')
(void)getAndAdvanceChar(CurPtr, Result);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case '\n':
// If we are inside a preprocessor directive and we see the end of line,
// we know we are done with the directive, so return an EOD token.
return LexCharConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result),
tok::wide_char_constant);
// FALL THROUGH, treating L like the start of an identifier.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// C99 6.4.2: Identifiers.
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
switch (bytesToWrite) { // note: everything falls through.
case 4:
*--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 3:
*--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 2:
*--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 1:
*--ResultBuf = (UTF8) (UcnVal | firstByteMark[bytesToWrite]);
}
break;
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'j':
case 'J':
if (isImaginary) break; // Cannot be repeated.
break;
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
Diags.Report(Tok.getLocation(), diag::err_mmap_unknown_token);
TrackGMFState.handleModule(ImportSeqState.afterTopLevelSeq());
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
TrackGMFState.handleMisc();
ImportSeqState.handleMisc();
Suffix.back().setLocation(SemiLoc);
Suffix.back().setAnnotationEndLoc(SemiLoc);
Suffix.back().setAnnotationValue(Action.ModuleForHeader);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ImportAction::ModuleImport:
case ImportAction::HeaderUnitImport:
// it as an identifier.
if (!PrevTok.hasUDSuffix())
return false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::identifier: // id+id or id+number or id+L"foo".
// id+'.'... will not append.
if (Tok.is(tok::numeric_constant))
case tok::semi:
if (StopAtSemi)
return false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
// consume this token.
Toks.push_back(Tok);
goto consume_token;
if (AngleCount) --AngleCount;
if (KnownTemplateCount) --KnownTemplateCount;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::greatergreater:
if (!getLangOpts().CPlusPlus11)
goto consume_token;
if (AngleCount) --AngleCount;
if (KnownTemplateCount) --KnownTemplateCount;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::greater:
if (AngleCount) --AngleCount;
if (KnownTemplateCount) --KnownTemplateCount;
case tok::semi:
if (CIK == CIK_DefaultInitializer)
return true; // End of the default initializer.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
consume_token:
Toks.push_back(Tok);
}
}
// Fall through.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case tok::comma:
case tok::equal:
isInvalid = true;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_private:
// It's fine (but redundant) to check this for __generic on the
// fallthrough path; we only form the __generic token in OpenCL mode.
if (!getLangOpts().OpenCL)
goto DoneWithDeclSpec;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___private:
case tok::kw___global:
case tok::kw___local:
case tok::identifier: // foo::bar
if (TryAltiVecVectorToken())
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_typename: // typename T::type
// Annotate typenames and C++ scope specifiers. If we get one, just
// recurse to handle whatever we get.
return false;
if (TryAltiVecVectorToken())
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_decltype: // decltype(T())::type
case tok::kw_typename: // typename T::type
// Annotate typenames and C++ scope specifiers. If we get one, just
case tok::kw_private:
if (!getLangOpts().OpenCL)
goto DoneWithTypeQuals;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___private:
case tok::kw___global:
case tok::kw___local:
if (TryKeywordIdentFallback(false))
continue;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___sptr:
case tok::kw___w64:
case tok::kw___ptr64:
continue; // do *not* consume the next token!
}
// otherwise, FALL THROUGH!
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
DoneWithTypeQuals:
// If this is not a type-qualifier token, we're done reading type
case tok::r_brace:
if (!NestedModules)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
ParsedAttributes Attrs(AttrFactory);
MaybeParseCXX11Attributes(Attrs);
// yet.
if (getLangOpts().OpenCL && !NextToken().is(tok::colon))
return ParseCXXClassMemberDeclaration(AS, AccessAttrs);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_public:
case tok::kw_protected: {
if (getLangOpts().HLSL)
Diag(Result.KeywordLoc, diag::warn_microsoft_dependent_exists)
<< Result.IsIfExists;
// Fall through to skip.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case IEB_Skip:
Braces.skipToEnd();
case CastParseKind::UnaryExprOnly:
if (!getLangOpts().CPlusPlus)
ParenExprType = CompoundLiteral;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CastParseKind::AnyCastExpr:
ParenExprType = ParenParseOption::CastExpr;
break;
case tok::kw__Alignof: // unary-expression: '_Alignof' '(' type-name ')'
if (!getLangOpts().C11)
Diag(Tok, diag::ext_c11_feature) << Tok.getName();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_alignof: // unary-expression: 'alignof' '(' type-id ')'
case tok::kw___alignof: // unary-expression: '__alignof' unary-expression
// unary-expression: '__alignof' '(' type-name ')'
Ty.get(), nullptr);
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::annot_decltype:
case tok::kw_char:
}
// Fall through to treat the template-id as an id-expression.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case tok::kw_operator: // [C++] id-expression: operator/conversion-function-id
Res = ParseObjCMessageExpression();
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
NotCastExpr = true;
return ExprError();
if (Tok.isAtStartOfLine())
return Res;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::period:
case tok::arrow:
break;
break;
}
// Fall through; this isn't a message send.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default: // Not a postfix-expression suffix.
return LHS;
Diag(Result.KeywordLoc, diag::warn_microsoft_dependent_exists)
<< Result.IsIfExists;
// Fall through to skip.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case IEB_Skip:
Braces.skipToEnd();
case tok::identifier: // identifier
if (!WithOperator)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
P.Diag(Tok.getLocation(), diag::err_omp_expected_reduction_identifier);
P.SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end,
}
HasAssociatedStatement = false;
// Fall through for further analysis.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPD_parallel:
case OMPD_simd:
case OMPD_tile:
<< getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
ErrorFound = true;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPC_if:
Clause = ParseOpenMPSingleExprWithArgClause(DKind, CKind, WrongDirective);
break;
Clause = ParseOpenMPClause(CKind, WrongDirective);
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPC_init:
case OMPC_use:
Clause = ParseOpenMPInteropClause(CKind, WrongDirective);
}
// Fall through
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
default: {
// processing a #pragma omp clause.
ProhibitAttributes(CXX11Attrs);
ProhibitAttributes(GNUAttrs);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::annot_attr_openmp:
// Do not prohibit attributes if they were OpenMP attributes.
return ParseOpenMPDeclarativeOrExecutableDirective(StmtCtx);
ConsumeToken();
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_typeof:
case tok::kw___attribute:
case tok::kw___underlying_type: {
case tok::annot_cxxscope:
ConsumeAnnotationToken();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
ConsumeAnyToken();
if (Next.isOneOf(tok::kw_new, // ::new
tok::kw_delete)) // ::delete
return TPResult::False;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case tok::kw___super:
case tok::kw_decltype:
case tok::kw_private:
if (!getLangOpts().OpenCL)
return TPResult::False;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw___private:
case tok::kw___local:
case tok::kw___global:
return TPResult::False;
}
// If that succeeded, fallthrough into the generic simple-type-id case.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// The ambiguity resides in a simple-type-specifier/typename-specifier
// followed by a '('. The '(' could either be the start of:
return TPResult::True;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_char:
case tok::kw_wchar_t:
case tok::semi:
if (HasFlagsSet(Flags, StopAtSemi))
return false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
// Skip this token.
ConsumeAnyToken();
}
// This must be 'export template'. Parse it so we can diagnose our lack
// of support.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::kw_using:
case tok::kw_namespace:
case tok::kw_typedef:
AnnotateScopeToken(SS, !WasScopeAnnotation);
return ANK_TemplateName;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::NC_VarTemplate:
case Sema::NC_FunctionTemplate:
case Sema::NC_UndeclaredTemplate: {
Diag(Tok, diag::err_invalid_token_after_declarator_suggest_equal)
<< Kind
<< FixItHint::CreateReplacement(SourceRange(Tok.getLocation()), "=");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::equal:
return true;
}
++TokOffs;
--TokLen;
// FALL THROUGH to chop the 8
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::wide_string_literal:
case tok::utf16_string_literal:
case tok::utf32_string_literal:
// Chop off the L, u, U or 8 prefix
++TokOffs;
--TokLen;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case tok::string_literal:
// FIXME: Exclude the optional ud-suffix from the highlighted range.
HighlightRange(RB, TokOffs, TokOffs+TokLen, BufferStart,
// Do nothing: Patterns can come with cursor kinds!
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case RK_Declaration: {
// Set the availability based on attributes.
BuildScopeInformation(Var, ParentScope);
++StmtsToSkip;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Stmt::GotoStmtClass:
// Remember both what scope a goto is in as well as the fact that we have
case Builtin::BI__builtin_alloca_with_align_uninitialized:
if (SemaBuiltinAllocaWithAlign(TheCall))
return ExprError();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_alloca:
case Builtin::BI__builtin_alloca_uninitialized:
Diag(TheCall->getBeginLoc(), diag::warn_alloca)
break;
case Builtin::BI__builtin_os_log_format:
Cleanup.setExprNeedsCleanups(true);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BI__builtin_os_log_format_buffer_size:
if (SemaBuiltinOSLogFormat(TheCall))
return ExprError();
case PPC::BI__builtin_unpack_longdouble:
if (SemaBuiltinConstantArgRange(TheCall, 1, 0, 1))
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case PPC::BI__builtin_pack_longdouble:
if (&TI.getLongDoubleFormat() != &llvm::APFloat::PPCDoubleDouble())
return Diag(TheCall->getBeginLoc(), diag::err_ppc_builtin_requires_abi)
return IntRange(R.Width, /*NonNegative*/ true);
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case BO_ShlAssign:
return IntRange::forValueOfType(C, GetExprType(E));
Results.AddResult(Result("mutable"));
Results.AddResult(Result("virtual"));
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::PCC_ObjCInterface:
case Sema::PCC_ObjCImplementation:
AddObjCTopLevelResults(Results, true);
AddTypedefResult(Results);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::PCC_Class:
if (SemaRef.getLangOpts().CPlusPlus) {
Builder);
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::PCC_Template:
case Sema::PCC_MemberTemplate:
AddStaticAssertResult(Builder, Results, SemaRef.getLangOpts());
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// Fall through (for statement expressions).
case Sema::PCC_ForInit:
case Sema::PCC_Condition:
AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results);
// Fall through: conditions and statements can have expressions.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::PCC_ParenthesizedExpression:
if (SemaRef.getLangOpts().ObjCAutoRefCount &&
Results.AddResult(Result(Builder.TakeString()));
}
// Fall through
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::PCC_Expression: {
if (SemaRef.getLangOpts().CPlusPlus) {
}
}
// If typo correction failed or was not performed, fall through
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LookupResult::FoundOverloaded:
case LookupResult::FoundUnresolvedValue:
Result.suppressDiagnostics();
Diag(D.getDeclSpec().getConstexprSpecLoc(),
diag::err_constexpr_wrong_decl_kind)
<< static_cast<int>(D.getDeclSpec().getConstexprSpecifier());
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ConstexprSpecKind::Constexpr:
NewVD->setConstexpr(true);
// that has an in-class initializer, so we type-check this like
// a declaration.
//
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case VarDecl::DeclarationOnly:
// It's only a declaration.
PastFunctionChunk = true;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorChunk::Array:
NeedsTypedef = true;
extendRight(After, Chunk.getSourceRange());
if (!Args[1]->isDefaultArgument())
return false;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 1:
return !Args[0]->isDefaultArgument();
}
case EST_NoexceptTrue:
if (!Finder.TraverseStmt(Proto->getNoexceptExpr()))
return true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case EST_Dynamic:
for (const auto &E : Proto->exceptions()) {
DiagRuntimeBehavior(
E->getBeginLoc(), nullptr,
PDiag(diag::warn_cxx98_compat_pass_non_pod_arg_to_vararg) << Ty << CT);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case VAK_Valid:
if (Ty->isRecordType()) {
// This is unlikely to be what the user intended. If the class has a
valueKind = VK_PRValue;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Decl::ImplicitParam:
case Decl::ParmVar: {
valueKind = VK_LValue;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Decl::CXXConversion:
case Decl::CXXDestructor:
break;
case BO_And:
checkObjCPointerIntrospection(*this, LHS, RHS, OpLoc);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case BO_Xor:
case BO_Or:
ResultTy = CheckBitwiseOperands(LHS, RHS, OpLoc, Opc);
case BO_AndAssign:
case BO_OrAssign: // fallthrough
DiagnoseSelfAssignment(*this, LHS.get(), RHS.get(), OpLoc, true);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case BO_XorAssign:
CompResultTy = CheckBitwiseOperands(LHS, RHS, OpLoc, Opc);
CompLHSTy = CompResultTy;
case UTT_HasTrivialDestructor:
case UTT_HasVirtualDestructor:
ArgTy = QualType(ArgTy->getBaseElementTypeUnsafe(), 0);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// C++1z [meta.unary.prop]:
// T shall be a complete type, cv void, or an array of unknown bound.
case IMA_Field_Uneval_Context:
Diag(R.getNameLoc(), diag::warn_cxx98_compat_non_static_member_use)
<< R.getLookupNameInfo().getName();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case IMA_Static:
case IMA_Abstract:
case IMA_Mixed_StaticContext:
// char8_t array can be initialized with a UTF-8 string.
if (ElemTy->isChar8Type())
return SIF_None;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case StringLiteral::Ordinary:
// char array can be initialized with a narrow string.
// Only allow char x[] = "foo"; not char x[] = L"foo";
case IndirectLocalPathEntry::VarInit:
if (cast<VarDecl>(Path[I].D)->isImplicit())
return SourceRange();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case IndirectLocalPathEntry::DefaultInit:
return Path[I].E->getSourceRange();
<< Step->Type << CurInit.get()->getType()
<< CurInit.get()->getSourceRange();
updateGNUCompoundLiteralRValue(CurInit.get());
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SK_ArrayInit:
// If the destination type is an incomplete array type, update the
// type accordingly.
<< Args[0]->getSourceRange();
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case FK_NonConstLValueReferenceBindingToUnrelated:
S.Diag(Kind.getLocation(),
if (!IsInNonspecializedTemplate)
return std::make_tuple(nullptr, ManglingContextDecl);
// Fall through to get the current context.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DataMember:
// -- the in-class initializers of class members
for (const auto &Arg : Proto->param_types())
Queue.push_back(Arg.getTypePtr());
// fallthrough
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Type::FunctionNoProto: {
const FunctionType *FnType = cast<FunctionType>(T);
case OMPC_write:
case OMPC_update:
MutexClauseEncountered = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPC_capture:
case OMPC_compare: {
if (AtomicKind != OMPC_unknown && MutexClauseEncountered) {
CaptureRegion = OMPD_parallel;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPD_target_parallel:
case OMPD_target_parallel_for:
case OMPD_target_parallel_loop:
CaptureRegion = OMPD_parallel;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPD_target_teams_distribute_parallel_for:
// If this clause applies to the nested 'parallel' region, capture within
// the 'teams' region, otherwise do not capture.
CaptureRegion = OMPD_parallel;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPD_teams_distribute_parallel_for:
CaptureRegion = OMPD_teams;
break;
HadMultipleCandidates,
ExplicitConversions))
return ExprError();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OR_Deleted:
// We'll complain below about a non-integral condition type.
break;
case OO_Plus: // '+' is either unary or binary
if (Args.size() == 1)
OpBuilder.addUnaryPlusPointerOverloads();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OO_Minus: // '-' is either unary or binary
if (Args.size() == 1) {
case OO_Equal:
OpBuilder.addAssignmentMemberPointerOrEnumeralOverloads();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OO_PlusEqual:
case OO_MinusEqual:
OpBuilder.addAssignmentPointerOverloads(Op == OO_Equal);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OO_StarEqual:
case OO_SlashEqual:
SemaRef.PDiag(diag::err_for_range_invalid)
<< BeginRange->getType() << BEFFound),
SemaRef, OCD_AllCandidates, BeginRange);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Sema::FRS_DiagnosticIssued:
for (NamedDecl *D : OldFound) {
if (RequireCompleteType(OutputExpr->getBeginLoc(), Exprs[i]->getType(),
diag::err_dereference_incomplete_type))
return StmtError();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return StmtError(Diag(OutputExpr->getBeginLoc(),
diag::err_asm_invalid_lvalue_in_output)
}
}
// fallthrough
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
default: {
// We have a template type parameter but the template argument
return false;
}
// Fall through
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case TSK_ExplicitInstantiationDeclaration:
case TSK_ExplicitInstantiationDefinition:
}
// Fall through to create a dependent typename type, from which we can recover
// better.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LookupResult::NotFoundInCurrentInstantiation:
// Okay, it's a member of an unknown instantiation.
// FIXME: Implement deduction in dependent case.
if (P->isDependentType())
return Sema::TDK_Success;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Type::Builtin:
case Type::VariableArray:
case Type::Vector:
switch (FPA->canThrow()) {
case CT_Cannot:
Noexcept = 1;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CT_Can:
// We give E in noexcept(E) the "deduced from array bound" treatment.
cast<DependentSizedArrayType>(T)->getSizeExpr(),
OnlyDeduced, Depth, Used);
// Fall through to check the element type
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Type::ConstantArray:
case Type::IncompleteArray:
case Type::InjectedClassName:
T = cast<InjectedClassNameType>(T)->getInjectedSpecializationType();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Type::TemplateSpecialization: {
const TemplateSpecializationType *Spec
// context, depending on what else is on the stack.
if (isa<TypeAliasTemplateDecl>(Active->Entity))
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CodeSynthesisContext::DefaultFunctionArgumentInstantiation:
case CodeSynthesisContext::ExceptionSpecInstantiation:
case CodeSynthesisContext::ConstraintsCheck:
FD->getReturnType()->isLValueReferenceType()) {
return false;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Builtin::BImove:
case Builtin::BImove_if_noexcept:
// HACK: Super-old versions of libc++ (3.1 and earlier) provide
if (onlyBlockPointers)
continue;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorChunk::BlockPointer:
result = &ptrChunk;
}
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclSpec::TST_int: {
if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {
switch (DS.getTypeSpecWidth()) {
!D.getNumTypeObjects() &&
D.getDeclSpec().getParsedSpecifiers() == DeclSpec::PQ_TypeSpecifier)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorContext::TemplateTypeArg:
Error = 10; // Template type argument
break;
if (SemaRef.getLangOpts().CPlusPlus2b && IsCXXAutoType &&
!Auto->isDecltypeAuto())
break; // auto(x)
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorContext::TypeName:
case DeclaratorContext::Association:
Error = 15; // Generic
case DeclaratorChunk::Paren:
if (&C == &Paren)
continue;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorChunk::Pointer:
StartsWithDeclaratorId = false;
continue;
case DeclaratorContext::TrailingReturn:
case DeclaratorContext::TrailingReturnVar:
isFunctionOrMethod = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorContext::Member:
if (state.getDeclarator().isObjCIvar() && !isFunctionOrMethod) {
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DeclaratorContext::File:
case DeclaratorContext::KNRTypeList: {
case CAMN_InnerPointers:
if (NumPointersRemaining == 0)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CAMN_Yes:
checkNullabilityConsistency(S, pointerKind, pointerLoc, pointerEndLoc);
case EST_NoexceptTrue:
case EST_NoThrow:
// Exception spec doesn't conflict with nothrow, so don't warn.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case EST_Unparsed:
case EST_Uninstantiated:
case EST_DependentNoexcept:
// clang, so revert to attribute-based handling for C.
if (!state.getSema().getLangOpts().CPlusPlus)
break;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
FUNCTION_TYPE_ATTRS_CASELIST:
attr.setUsedAsTypeAttr();
switch (NumArgs) {
case 3:
Arg3 = Diag.getStringArg(2);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 2:
Arg2 = Diag.getStringArg(1);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 1:
Arg1 = Diag.getStringArg(0);
}
case DeadIncrement:
BugType = "Dead increment";
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Standard:
if (!BugType) BugType = "Dead assignment";
os << "Value stored to '" << *V << "' is never read";
// If it's not a dereference, we don't care if it was reset to null
// or that it is even a smart pointer.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SK_NonStd:
case SK_Safe:
OS << "Object";
break;
// We only care about the type if it's a dereference.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case SK_Unsafe:
OS << " of type '" << RD->getQualifiedNameAsString() << "'";
break;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case DoNothing:
return state;
}
}
// FALLTHROUGH
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Stmt::CallExprClass:
}
// Explicitly proceed with default handler for this case cascade.
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
// Various C++ casts that are not handled yet.
case CK_ToUnion:
case CK_MatrixCast:
}
case UO_Plus:
assert(!U->isGLValue());
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case UO_Deref:
case UO_Extension: {
handleUOExtension(I, U, Bldr);
// a simple temporary.
CallOpts = PreElideCallOpts;
CallOpts.IsElidableCtorThatHasNotBeenElided = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case ConstructionContext::SimpleTemporaryObjectKind: {
const auto *TCC = cast<TemporaryObjectConstructionContext>(CC);
}
// If we decided not to elide the constructor, proceed as if
// it's a simple temporary.
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case ConstructionContext::SimpleTemporaryObjectKind: {
const auto *TCC = cast<TemporaryObjectConstructionContext>(CC);
("This virtual base should have already been initialized by "
"the most derived class!"));
(void)OuterCtor;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case CXXConstructExpr::CK_NonVirtualBase:
// In C++17, classes with non-virtual bases may be aggregates, so they would
CallOpts.IsCtorOrDtorWithImproperlyModeledTargetRegion = true;
break;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CXXConstructExpr::CK_Delegating: {
const CXXMethodDecl *CurCtor = cast<CXXMethodDecl>(LCtx->getDecl());
Loc ThisPtr = getSValBuilder().getCXXThis(CurCtor,
break;
}
case CE_CXXDeallocator:
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CE_CXXAllocator:
if (Opts.MayInlineCXXAllocator)
break;
case GFK_All:
B = invalidateGlobalRegion(MemRegion::GlobalInternalSpaceRegionKind,
Ex, Count, LCtx, B, Invalidated);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GFK_SystemOnly:
B = invalidateGlobalRegion(MemRegion::GlobalSystemSpaceRegionKind,
Ex, Count, LCtx, B, Invalidated);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case GFK_None:
break;
}
}
}
// FALLTHROUGH
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
// If we don't have a special case, fall back to the AST's constant evaluator.
case BO_LE:
case BO_GE:
op = BinaryOperator::reverseComparisonOp(op);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case BO_EQ:
case BO_NE:
case BO_Add:
// (~0)>>a
if (LHSValue.isAllOnes() && LHSValue.isSigned())
return evalCast(lhs, resultTy, QualType{});
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case BO_Shl:
// 0<<a and 0>>a
if (LHSValue == 0)
// 0 % x == 0
if (LHSValue == 0)
return makeZeroVal(resultTy);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
default:
return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
}
break;
case 'h':
Kind = Float;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 's':
ElementBitwidth = 16;
break;
case 'f':
Kind = Float;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'i':
ElementBitwidth = 32;
break;
case 'd':
Kind = Float;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'l':
ElementBitwidth = 64;
break;
break;
case 'c':
Constant = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'p':
Pointer = true;
Bitwidth = ElementBitwidth;