[PATCH] D51110: [ASTImporter] Remove duplicated and dead CXXNamedCastExpr handling code.
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 15:50:28 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC340466: [ASTImporter] Remove duplicated and dead CXXNamedCastExpr handling code. (authored by teemperor, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51110?vs=161994&id=162084#toc
Repository:
rC Clang
https://reviews.llvm.org/D51110
Files:
lib/AST/ASTImporter.cpp
Index: lib/AST/ASTImporter.cpp
===================================================================
--- lib/AST/ASTImporter.cpp
+++ lib/AST/ASTImporter.cpp
@@ -6088,38 +6088,6 @@
TInfo, SubExpr);
}
default:
- break; // just fall through
- }
-
- auto *Named = cast<CXXNamedCastExpr>(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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51110.162084.patch
Type: text/x-patch
Size: 1860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180822/bbb94a3f/attachment.bin>
More information about the cfe-commits
mailing list