diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2012-06-15 21:22:05 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2012-06-15 21:22:05 +0000 |
commit | c2f51cfefd77e9b25f201ecf879343d6d9a45158 (patch) | |
tree | 41f544aeb3ef93b401cd7e8a6a41679ea5f53aaf /lib/Sema/AnalysisBasedWarnings.cpp | |
parent | 1f6e22d14419db7162202854190f690f393daf2d (diff) |
Stop referring to functions as methods in per-function fallthrough-checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 14 |
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); } |