[clang] 57ef16c - Fix -Wswitch warning after 4fef204ac42eb84e167d43ce076c9a167eae3be0

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 1 06:40:55 PDT 2024


Author: Haojian Wu
Date: 2024-09-01T15:40:44+02:00
New Revision: 57ef16c699c274b7f3eee12e5c2896e193f513c4

URL: https://github.com/llvm/llvm-project/commit/57ef16c699c274b7f3eee12e5c2896e193f513c4
DIFF: https://github.com/llvm/llvm-project/commit/57ef16c699c274b7f3eee12e5c2896e193f513c4.diff

LOG: Fix -Wswitch warning after 4fef204ac42eb84e167d43ce076c9a167eae3be0

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index bb4db089a765ce..e5a1e20a265616 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -7897,6 +7897,9 @@ Decl *ASTReader::getPredefinedDecl(PredefinedDeclIDs ID) {
       return Context.TypePackElementDecl;
     NewLoaded = Context.getTypePackElementDecl();
     break;
+  case NUM_PREDEF_DECL_IDS:
+    llvm_unreachable("Invalid decl ID");
+    break;
   }
 
   assert(NewLoaded && "Failed to load predefined decl?");


        


More information about the cfe-commits mailing list