aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-04 09:57:16 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-04 09:57:16 +0000
commit9ec9445402f4365fb0ac6e28e8be78cda3e9d8af (patch)
tree06c21c947dae6d8d14c926b667c2adb817284d26 /lib/Sema/SemaExprCXX.cpp
parent00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b (diff)
dyn_cast else unreachable -> cast
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 965328615d..fc396b992f 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1719,8 +1719,8 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
// the initial standard conversion sequence converts the source type to
// the implicit object parameter of the conversion function.
BeforeToType = Context.getTagDeclType(Conv->getParent());
- } else if (const CXXConstructorDecl *Ctor =
- dyn_cast<CXXConstructorDecl>(FD)) {
+ } else {
+ const CXXConstructorDecl *Ctor = cast<CXXConstructorDecl>(FD);
CastKind = CK_ConstructorConversion;
// Do no conversion if dealing with ... for the first conversion.
if (!ICS.UserDefined.EllipsisConversion) {
@@ -1730,8 +1730,6 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
BeforeToType = Ctor->getParamDecl(0)->getType().getNonReferenceType();
}
}
- else
- assert(0 && "Unknown conversion function kind!");
// Watch out for elipsis conversion.
if (!ICS.UserDefined.EllipsisConversion) {
if (PerformImplicitConversion(From, BeforeToType,