[clang] [Sema] Fix warning in SemaOpenACC.cpp (PR #112481)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 22:54:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Karl-Johan Karlsson (karka228)

<details>
<summary>Changes</summary>

Fix gcc warning:

clang/lib/Sema/SemaOpenACC.cpp:2208:5: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
Full diff: https://github.com/llvm/llvm-project/pull/112481.diff


1 Files Affected:

- (modified) clang/lib/Sema/SemaOpenACC.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/Sema/SemaOpenACC.cpp b/clang/lib/Sema/SemaOpenACC.cpp
index 22aedbc70df8cc..d33b0d0c1c3018 100644
--- a/clang/lib/Sema/SemaOpenACC.cpp
+++ b/clang/lib/Sema/SemaOpenACC.cpp
@@ -2216,7 +2216,7 @@ ExprResult SemaOpenACC::CheckGangExpr(OpenACCGangKind GK, Expr *E) {
     case OpenACCGangKind::Static:
       return CheckGangStaticExpr(*this, E);
     }
-  }
+  } break;
   default:
     llvm_unreachable("Non compute construct in active compute construct?");
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/112481


More information about the cfe-commits mailing list