[clang] caf0072 - [Sema] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 13:00:09 PDT 2023


Author: Kazu Hirata
Date: 2023-06-05T12:59:58-07:00
New Revision: caf00725923cb89af9b9478c53496e9f81ee4d6d

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

LOG: [Sema] Fix a warning

This patch fixes:

  clang/lib/Sema/SemaExprCXX.cpp:5591:3: error: default label in
  switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    clang/lib/Sema/SemaExprCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 30925c37dc08c..eeae6cda53e5b 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -5588,9 +5588,6 @@ ExprResult Sema::BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc,
     return TypeTraitExpr::Create(Context, Context.getLogicalOperationType(),
                                  KWLoc, Kind, Args, RParenLoc, Result);
   }
-  default:
-    llvm_unreachable("reached the end of BuildTypeTrait because the type "
-                     "trait's type is unaccounted for");
   }
 }
 


        


More information about the cfe-commits mailing list