diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -11290,7 +11290,6 @@ assert(!T->isDependentType() && "unexpected dependent type"); QualType CanTy = T.getCanonicalType(); - const BuiltinType *BT = dyn_cast(CanTy); switch (CanTy->getTypeClass()) { #define TYPE(ID, BASE) @@ -11303,7 +11302,7 @@ llvm_unreachable("unexpected non-canonical or dependent type"); case Type::Builtin: - switch (BT->getKind()) { + switch (cast(CanTy)->getKind()) { #define BUILTIN_TYPE(ID, SINGLETON_ID) #define SIGNED_TYPE(ID, SINGLETON_ID) \ case BuiltinType::ID: return GCCTypeClass::Integer;