[clang] 0f1bc5d - Fix GCC Wimplicit-fallthrough warnings. NFC.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 8 06:08:07 PDT 2024


Author: Simon Pilgrim
Date: 2024-09-08T14:07:38+01:00
New Revision: 0f1bc5dbf3c51a1ee33d6037a6a169f0b0fbe217

URL: https://github.com/llvm/llvm-project/commit/0f1bc5dbf3c51a1ee33d6037a6a169f0b0fbe217
DIFF: https://github.com/llvm/llvm-project/commit/0f1bc5dbf3c51a1ee33d6037a6a169f0b0fbe217.diff

LOG: Fix GCC Wimplicit-fallthrough warnings. NFC.

Added: 
    

Modified: 
    clang/lib/Sema/Sema.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 29acd06af603be..46ddd360870b4f 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -2865,6 +2865,7 @@ bool FunctionEffectDiff::shouldDiagnoseConversion(
       // matching is better.
       return true;
     }
+    llvm_unreachable("Unhandled FunctionEffectDiff::Kind enum");
   case FunctionEffect::Kind::Blocking:
   case FunctionEffect::Kind::Allocating:
     return false;
@@ -2890,6 +2891,7 @@ bool FunctionEffectDiff::shouldDiagnoseRedeclaration(
       // All these forms of mismatches are diagnosed.
       return true;
     }
+    llvm_unreachable("Unhandled FunctionEffectDiff::Kind enum");
   case FunctionEffect::Kind::Blocking:
   case FunctionEffect::Kind::Allocating:
     return false;
@@ -2921,6 +2923,7 @@ FunctionEffectDiff::shouldDiagnoseMethodOverride(
     case Kind::ConditionMismatch:
       return OverrideResult::Warn;
     }
+    llvm_unreachable("Unhandled FunctionEffectDiff::Kind enum");
 
   case FunctionEffect::Kind::Blocking:
   case FunctionEffect::Kind::Allocating:


        


More information about the cfe-commits mailing list