[clang] c85abbe - [Sema] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 14 11:25:25 PDT 2022


Author: Kazu Hirata
Date: 2022-08-14T11:25:19-07:00
New Revision: c85abbe879ef3257de4db862ce249b060cc3d2a4

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

LOG: [Sema] Fix a warning

This patch fixes:

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

Added: 
    

Modified: 
    clang/lib/Sema/SemaType.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 5bd0dac50362..fb339fab16a8 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -9466,8 +9466,6 @@ QualType Sema::BuildUnaryTransformType(QualType BaseType, UTTKind UKind,
     Result = BuiltinChangeSignedness(BaseType, UKind, Loc);
     break;
   }
-  default:
-    llvm_unreachable("unknown unary transform type");
   }
 
   return !Result.isNull()


        


More information about the cfe-commits mailing list