aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/AnalysisBasedWarnings.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp
index 7eba772743..1d74d7f765 100644
--- a/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/lib/Sema/AnalysisBasedWarnings.cpp
@@ -821,14 +821,14 @@ namespace {
}
static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
- bool PerMethod) {
+ bool PerFunction) {
FallthroughMapper FM(S);
FM.TraverseStmt(AC.getBody());
if (!FM.foundSwitchStatements())
return;
- if (PerMethod && FM.getFallthroughStmts().empty())
+ if (PerFunction && FM.getFallthroughStmts().empty())
return;
CFG *Cfg = AC.getCFG();
@@ -849,8 +849,8 @@ static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
continue;
S.Diag(Label->getLocStart(),
- PerMethod ? diag::warn_unannotated_fallthrough_per_method
- : diag::warn_unannotated_fallthrough);
+ PerFunction ? diag::warn_unannotated_fallthrough_per_function
+ : diag::warn_unannotated_fallthrough);
if (!AnnotatedCnt) {
SourceLocation L = Label->getLocStart();
@@ -1339,10 +1339,10 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
bool FallThroughDiagFull =
Diags.getDiagnosticLevel(diag::warn_unannotated_fallthrough,
D->getLocStart()) != DiagnosticsEngine::Ignored;
- bool FallThroughDiagPerMethod =
- Diags.getDiagnosticLevel(diag::warn_unannotated_fallthrough_per_method,
+ bool FallThroughDiagPerFunction =
+ Diags.getDiagnosticLevel(diag::warn_unannotated_fallthrough_per_function,
D->getLocStart()) != DiagnosticsEngine::Ignored;
- if (FallThroughDiagFull || FallThroughDiagPerMethod) {
+ if (FallThroughDiagFull || FallThroughDiagPerFunction) {
DiagnoseSwitchLabelsFallthrough(S, AC, !FallThroughDiagFull);
}