Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -6037,38 +6037,6 @@ E->getCastKind(), Importer.Import(OCE->getBridgeKeywordLoc()), TInfo, SubExpr); } - default: - break; // just fall through - } - - auto *Named = cast(E); - SourceLocation ExprLoc = Importer.Import(Named->getOperatorLoc()), - RParenLoc = Importer.Import(Named->getRParenLoc()); - SourceRange Brackets = Importer.Import(Named->getAngleBrackets()); - - switch (E->getStmtClass()) { - case Stmt::CXXStaticCastExprClass: - return CXXStaticCastExpr::Create(Importer.getToContext(), T, - E->getValueKind(), E->getCastKind(), - SubExpr, &BasePath, TInfo, - ExprLoc, RParenLoc, Brackets); - - case Stmt::CXXDynamicCastExprClass: - return CXXDynamicCastExpr::Create(Importer.getToContext(), T, - E->getValueKind(), E->getCastKind(), - SubExpr, &BasePath, TInfo, - ExprLoc, RParenLoc, Brackets); - - case Stmt::CXXReinterpretCastExprClass: - return CXXReinterpretCastExpr::Create(Importer.getToContext(), T, - E->getValueKind(), E->getCastKind(), - SubExpr, &BasePath, TInfo, - ExprLoc, RParenLoc, Brackets); - - case Stmt::CXXConstCastExprClass: - return CXXConstCastExpr::Create(Importer.getToContext(), T, - E->getValueKind(), SubExpr, TInfo, ExprLoc, - RParenLoc, Brackets); default: llvm_unreachable("Cast expression of unsupported type!"); return nullptr;