@@ -231,7 +231,7 @@ static StringRef getControlFlowString(const Stmt &Stmt) {
231
231
return " break" ;
232
232
if (isa<CXXThrowExpr>(Stmt))
233
233
return " throw" ;
234
- llvm_unreachable (" Unknown control flow interruptor " );
234
+ llvm_unreachable (" Unknown control flow interrupter " );
235
235
}
236
236
237
237
void ElseAfterReturnCheck::check (const MatchFinder::MatchResult &Result) {
@@ -247,12 +247,12 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
247
247
return ;
248
248
249
249
bool IsLastInScope = OuterScope->body_back () == If;
250
- StringRef ControlFlowInterruptor = getControlFlowString (*Interrupt);
250
+ const StringRef ControlFlowInterrupter = getControlFlowString (*Interrupt);
251
251
252
252
if (!IsLastInScope && containsDeclInScope (Else)) {
253
253
if (WarnOnUnfixable) {
254
254
// Warn, but don't attempt an autofix.
255
- diag (ElseLoc, WarningMessage) << ControlFlowInterruptor ;
255
+ diag (ElseLoc, WarningMessage) << ControlFlowInterrupter ;
256
256
}
257
257
return ;
258
258
}
@@ -264,7 +264,7 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
264
264
// If the if statement is the last statement of its enclosing statements
265
265
// scope, we can pull the decl out of the if statement.
266
266
DiagnosticBuilder Diag = diag (ElseLoc, WarningMessage)
267
- << ControlFlowInterruptor
267
+ << ControlFlowInterrupter
268
268
<< SourceRange (ElseLoc);
269
269
if (checkInitDeclUsageInElse (If) != nullptr ) {
270
270
Diag << tooling::fixit::createReplacement (
@@ -288,7 +288,7 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
288
288
removeElseAndBrackets (Diag, *Result.Context , Else, ElseLoc);
289
289
} else if (WarnOnUnfixable) {
290
290
// Warn, but don't attempt an autofix.
291
- diag (ElseLoc, WarningMessage) << ControlFlowInterruptor ;
291
+ diag (ElseLoc, WarningMessage) << ControlFlowInterrupter ;
292
292
}
293
293
return ;
294
294
}
@@ -300,7 +300,7 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
300
300
// If the if statement is the last statement of its enclosing statements
301
301
// scope, we can pull the decl out of the if statement.
302
302
DiagnosticBuilder Diag = diag (ElseLoc, WarningMessage)
303
- << ControlFlowInterruptor
303
+ << ControlFlowInterrupter
304
304
<< SourceRange (ElseLoc);
305
305
Diag << tooling::fixit::createReplacement (
306
306
SourceRange (If->getIfLoc ()),
@@ -312,13 +312,13 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
312
312
removeElseAndBrackets (Diag, *Result.Context , Else, ElseLoc);
313
313
} else if (WarnOnUnfixable) {
314
314
// Warn, but don't attempt an autofix.
315
- diag (ElseLoc, WarningMessage) << ControlFlowInterruptor ;
315
+ diag (ElseLoc, WarningMessage) << ControlFlowInterrupter ;
316
316
}
317
317
return ;
318
318
}
319
319
320
320
DiagnosticBuilder Diag = diag (ElseLoc, WarningMessage)
321
- << ControlFlowInterruptor << SourceRange (ElseLoc);
321
+ << ControlFlowInterrupter << SourceRange (ElseLoc);
322
322
removeElseAndBrackets (Diag, *Result.Context , Else, ElseLoc);
323
323
}
324
324
0 commit comments