[clang] [Sema] Fix warnings in SemaFunctionEffects.cpp (PR #112857)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 02:12:14 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Karl-Johan Karlsson (karka228)
<details>
<summary>Changes</summary>
Fix gcc warnings like:
SemaFunctionEffects.cpp:1531:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
---
Full diff: https://github.com/llvm/llvm-project/pull/112857.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaFunctionEffects.cpp (+3)
``````````diff
diff --git a/clang/lib/Sema/SemaFunctionEffects.cpp b/clang/lib/Sema/SemaFunctionEffects.cpp
index 70e5d78661a835..c3e2a2d856a283 100644
--- a/clang/lib/Sema/SemaFunctionEffects.cpp
+++ b/clang/lib/Sema/SemaFunctionEffects.cpp
@@ -1540,6 +1540,7 @@ bool Sema::FunctionEffectDiff::shouldDiagnoseConversion(
// matching is better.
return true;
}
+ break;
case FunctionEffect::Kind::Blocking:
case FunctionEffect::Kind::Allocating:
return false;
@@ -1563,6 +1564,7 @@ bool Sema::FunctionEffectDiff::shouldDiagnoseRedeclaration(
// All these forms of mismatches are diagnosed.
return true;
}
+ break;
case FunctionEffect::Kind::Blocking:
case FunctionEffect::Kind::Allocating:
return false;
@@ -1592,6 +1594,7 @@ Sema::FunctionEffectDiff::shouldDiagnoseMethodOverride(
case Kind::ConditionMismatch:
return OverrideResult::Warn;
}
+ break;
case FunctionEffect::Kind::Blocking:
case FunctionEffect::Kind::Allocating:
``````````
</details>
https://github.com/llvm/llvm-project/pull/112857
More information about the cfe-commits
mailing list