Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0972a39

Browse files
committedAug 9, 2022
LLVM_FALLTHROUGH => [[fallthrough]]. NFC
1 parent fc63c05 commit 0972a39

File tree

15 files changed

+23
-23
lines changed

15 files changed

+23
-23
lines changed
 

‎bolt/lib/Passes/FrameAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class FrameAccessAnalysis {
193193
switch (CFI->getOperation()) {
194194
case MCCFIInstruction::OpDefCfa:
195195
CfaOffset = CFI->getOffset();
196-
LLVM_FALLTHROUGH;
196+
[[fallthrough]];
197197
case MCCFIInstruction::OpDefCfaRegister:
198198
CfaReg = CFI->getRegister();
199199
break;

‎bolt/lib/Passes/RegReAssign.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void RegReAssign::swap(BinaryFunction &Function, MCPhysReg A, MCPhysReg B) {
9595
false)));
9696
}
9797
}
98-
LLVM_FALLTHROUGH;
98+
[[fallthrough]];
9999
case MCCFIInstruction::OpUndefined:
100100
case MCCFIInstruction::OpDefCfa:
101101
case MCCFIInstruction::OpOffset:

‎bolt/lib/Passes/ShrinkWrapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ void StackLayoutModifier::classifyCFIs() {
388388
case MCCFIInstruction::OpDefCfa:
389389
CfaOffset = -CFI->getOffset();
390390
recordAccess(&Inst, CfaOffset);
391-
LLVM_FALLTHROUGH;
391+
[[fallthrough]];
392392
case MCCFIInstruction::OpDefCfaRegister:
393393
CfaReg = CFI->getRegister();
394394
break;

‎bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
10021002
if (isUpper8BitReg(Operand.getReg()))
10031003
return true;
10041004
}
1005-
LLVM_FALLTHROUGH;
1005+
[[fallthrough]];
10061006
default:
10071007
return false;
10081008
}

‎clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ std::vector<std::string> FuzzySymbolIndex::tokenize(StringRef Text) {
8484
switch (State) {
8585
case BIG_WORD:
8686
Flush(I - 1); // FOOBar: first token is FOO, not FOOB.
87-
LLVM_FALLTHROUGH;
87+
[[fallthrough]];
8888
case ONE_BIG:
8989
State = SMALL_WORD;
90-
LLVM_FALLTHROUGH;
90+
[[fallthrough]];
9191
case SMALL_WORD:
9292
break;
9393
default:
@@ -98,7 +98,7 @@ std::vector<std::string> FuzzySymbolIndex::tokenize(StringRef Text) {
9898
switch (State) {
9999
case ONE_BIG:
100100
State = BIG_WORD;
101-
LLVM_FALLTHROUGH;
101+
[[fallthrough]];
102102
case BIG_WORD:
103103
break;
104104
default:

‎clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ void AvoidCStyleCastsCheck::check(const MatchFinder::MatchResult &Result) {
230230
}
231231
break;
232232
}
233-
LLVM_FALLTHROUGH;
233+
[[fallthrough]];
234234
case clang::CK_IntegralCast:
235235
// Convert integral and no-op casts between builtin types and enums to
236236
// static_cast. A cast from enum to integer may be unnecessary, but it's

‎clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ void AvoidBindCheck::check(const MatchFinder::MatchResult &Result) {
699699
Stream << "(" << LP.Callable.UsageIdentifier << ")";
700700
break;
701701
}
702-
LLVM_FALLTHROUGH;
702+
[[fallthrough]];
703703
case CE_InitExpression:
704704
Stream << LP.Callable.UsageIdentifier;
705705
break;

‎clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class FunctionASTVisitor : public RecursiveASTVisitor<FunctionASTVisitor> {
5252
case Stmt::ForStmtClass:
5353
case Stmt::SwitchStmtClass:
5454
++Info.Branches;
55-
LLVM_FALLTHROUGH;
55+
[[fallthrough]];
5656
case Stmt::CompoundStmtClass:
5757
TrackedParent.push_back(true);
5858
break;

‎clang-tools-extra/clangd/CodeComplete.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ struct CompletionCandidate {
221221
#ifndef NDEBUG
222222
llvm_unreachable("Don't expect members from index in code completion");
223223
#else
224-
LLVM_FALLTHROUGH;
224+
[[fallthrough]];
225225
#endif
226226
case index::SymbolKind::Function:
227227
// We can't group overloads together that need different #includes.

‎clang-tools-extra/clangd/SourceCode.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,14 +696,14 @@ void parseNamespaceEvents(llvm::StringRef Code, const LangOptions &LangOpts,
696696
switch (State) {
697697
case UsingNamespace:
698698
NSName.clear();
699-
LLVM_FALLTHROUGH;
699+
[[fallthrough]];
700700
case UsingNamespaceName:
701701
NSName.append(Tok.text(SM).str());
702702
State = UsingNamespaceName;
703703
break;
704704
case Namespace:
705705
NSName.clear();
706-
LLVM_FALLTHROUGH;
706+
[[fallthrough]];
707707
case NamespaceName:
708708
NSName.append(Tok.text(SM).str());
709709
State = NamespaceName;
@@ -720,7 +720,7 @@ void parseNamespaceEvents(llvm::StringRef Code, const LangOptions &LangOpts,
720720
switch (State) {
721721
case UsingNamespace:
722722
NSName.clear();
723-
LLVM_FALLTHROUGH;
723+
[[fallthrough]];
724724
case UsingNamespaceName:
725725
NSName.append("::");
726726
State = UsingNamespaceName;
@@ -865,7 +865,7 @@ llvm::StringSet<> collectWords(llvm::StringRef Content) {
865865
switch (Roles[I]) {
866866
case Head:
867867
Flush();
868-
LLVM_FALLTHROUGH;
868+
[[fallthrough]];
869869
case Tail:
870870
Word.push_back(Content[I]);
871871
break;

‎openmp/libomptarget/plugins/cuda/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ class DeviceRTLTy {
10751075

10761076
PeerAccessMatrix[SrcDevId][DstDevId] = PeerAccessState::Yes;
10771077

1078-
LLVM_FALLTHROUGH;
1078+
[[fallthrough]];
10791079
}
10801080
case PeerAccessState::Yes: {
10811081
Err = cuMemcpyPeerAsync(

‎polly/lib/Analysis/ScopBuilder.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ bool ScopBuilder::buildAccessCallInst(MemAccInst Inst, ScopStmt *Stmt) {
16551655
return true;
16561656
case FMRB_OnlyReadsArgumentPointees:
16571657
ReadOnly = true;
1658-
LLVM_FALLTHROUGH;
1658+
[[fallthrough]];
16591659
case FMRB_OnlyWritesArgumentPointees:
16601660
case FMRB_OnlyAccessesArgumentPointees: {
16611661
auto AccType = ReadOnly ? MemoryAccess::READ : MemoryAccess::MAY_WRITE;
@@ -2385,7 +2385,7 @@ void ScopBuilder::ensureValueRead(Value *V, ScopStmt *UserStmt) {
23852385
if (!ModelReadOnlyScalars)
23862386
break;
23872387

2388-
LLVM_FALLTHROUGH;
2388+
[[fallthrough]];
23892389
case VirtualUse::Inter:
23902390

23912391
// Do not create another MemoryAccess for reloading the value if one already
@@ -2482,7 +2482,7 @@ static MemoryAccess::ReductionType getReductionType(const BinaryOperator *BinOp,
24822482
case Instruction::FAdd:
24832483
if (!BinOp->isFast())
24842484
return MemoryAccess::RT_NONE;
2485-
LLVM_FALLTHROUGH;
2485+
[[fallthrough]];
24862486
case Instruction::Add:
24872487
return MemoryAccess::RT_ADD;
24882488
case Instruction::Or:
@@ -2494,7 +2494,7 @@ static MemoryAccess::ReductionType getReductionType(const BinaryOperator *BinOp,
24942494
case Instruction::FMul:
24952495
if (!BinOp->isFast())
24962496
return MemoryAccess::RT_NONE;
2497-
LLVM_FALLTHROUGH;
2497+
[[fallthrough]];
24982498
case Instruction::Mul:
24992499
if (DisableMultiplicativeReductions)
25002500
return MemoryAccess::RT_NONE;

‎polly/lib/Analysis/ScopDetection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ bool ScopDetection::isValidIntrinsicInst(IntrinsicInst &II,
783783
if (!isValidAccess(&II, AF, BP, Context))
784784
return false;
785785
}
786-
LLVM_FALLTHROUGH;
786+
[[fallthrough]];
787787
case Intrinsic::memset:
788788
AF = SE.getSCEVAtScope(cast<MemIntrinsic>(II).getDest(), L);
789789
if (!AF->isZero()) {

‎polly/lib/Support/VirtualInstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void walkReachable(Scop *S, LoopInfo *LI,
300300
// enabled.
301301
if (!VUse.getMemoryAccess())
302302
break;
303-
LLVM_FALLTHROUGH;
303+
[[fallthrough]];
304304
case VirtualUse::Inter:
305305
assert(VUse.getMemoryAccess());
306306
WorklistAccs.push_back(VUse.getMemoryAccess());

‎polly/lib/Transform/ForwardOpTree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ class ForwardOpTreeImpl final : ZoneAlgorithm {
801801
// reuse the information about UseStmt for DefStmt
802802
DefStmt = UseStmt;
803803

804-
LLVM_FALLTHROUGH;
804+
[[fallthrough]];
805805
case VirtualUse::Inter:
806806
Instruction *Inst = cast<Instruction>(UseVal);
807807

0 commit comments

Comments
 (0)
Please sign in to comment.