[clang] 69c6a3f - More -Wswitch warning fixes for a42e515e3a9f3bb4e44389c097b89104d95b9b29

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 05:21:50 PDT 2024


Author: Haojian Wu
Date: 2024-08-05T14:21:34+02:00
New Revision: 69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b

URL: https://github.com/llvm/llvm-project/commit/69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b
DIFF: https://github.com/llvm/llvm-project/commit/69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b.diff

LOG: More -Wswitch warning fixes for a42e515e3a9f3bb4e44389c097b89104d95b9b29

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    clang/tools/libclang/CIndex.cpp
    clang/tools/libclang/CXCursor.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 62a240ecbc600..686310d38ebd5 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1776,6 +1776,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
     case Stmt::OMPScanDirectiveClass:
     case Stmt::OMPOrderedDirectiveClass:
     case Stmt::OMPAtomicDirectiveClass:
+    case Stmt::OMPAssumeDirectiveClass:
     case Stmt::OMPTargetDirectiveClass:
     case Stmt::OMPTargetDataDirectiveClass:
     case Stmt::OMPTargetEnterDataDirectiveClass:

diff  --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 40c74d49e41e9..c00cad1ad65af 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -3326,7 +3326,7 @@ void EnqueueVisitor::VisitOMPTaskwaitDirective(const OMPTaskwaitDirective *D) {
 }
 
 void EnqueueVisitor::VisitOMPAssumeDirective(const OMPAssumeDirective *D) {
-  VisitOMPAssumeDirective(D);
+  VisitOMPExecutableDirective(D);
 }
 
 void EnqueueVisitor::VisitOMPErrorDirective(const OMPErrorDirective *D) {

diff  --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp
index 782c0c243ef1f..d87eb95761ed7 100644
--- a/clang/tools/libclang/CXCursor.cpp
+++ b/clang/tools/libclang/CXCursor.cpp
@@ -888,6 +888,10 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent,
     break;
   case Stmt::BuiltinBitCastExprClass:
     K = CXCursor_BuiltinBitCastExpr;
+    break;
+  case Stmt::OMPAssumeDirectiveClass:
+    K = CXCursor_OMPAssumeDirective;
+    break;
   }
 
   CXCursor C = {K, 0, {Parent, S, TU}};


        


More information about the cfe-commits mailing list