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

Karl-Johan Karlsson via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 22:53:51 PDT 2024


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

Fix gcc warning:

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

>From 1015e28263bdfafd62c061200163899d0f8a7f69 Mon Sep 17 00:00:00 2001
From: Karl-Johan Karlsson <karl-johan.karlsson at ericsson.com>
Date: Wed, 16 Oct 2024 07:48:11 +0200
Subject: [PATCH] [Sema] Fix warning in SemaOpenACC.cpp

Fix gcc warning:

clang/lib/Sema/SemaOpenACC.cpp:2208:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
---
 clang/lib/Sema/SemaOpenACC.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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?");
   }



More information about the cfe-commits mailing list