aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index eb0b6e1eff..5a40fc83c5 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1275,38 +1275,6 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
return false;
}
-bool Sema::CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
-{
- // First we check for applicability.
- // Target type must be a function, function pointer or function reference.
- if (const PointerType *PtrTy = ToType->getAs<PointerType>())
- ToType = PtrTy->getPointeeType();
- else if (const ReferenceType *RefTy = ToType->getAs<ReferenceType>())
- ToType = RefTy->getPointeeType();
-
- const FunctionProtoType *ToFunc = ToType->getAs<FunctionProtoType>();
- if (!ToFunc)
- return false;
-
- // SourceType must be a function or function pointer.
- // References are treated as functions.
- QualType FromType = From->getType();
- if (const PointerType *PtrTy = FromType->getAs<PointerType>())
- FromType = PtrTy->getPointeeType();
-
- const FunctionProtoType *FromFunc = FromType->getAs<FunctionProtoType>();
- if (!FromFunc)
- return false;
-
- // Now we've got the correct types on both sides, check their compatibility.
- // This means that the source of the conversion can only throw a subset of
- // the exceptions of the target, and any exception specs on arguments or
- // return types must be equivalent.
- return CheckExceptionSpecSubset(diag::err_incompatible_exception_specs,
- 0, ToFunc, From->getSourceRange().getBegin(),
- FromFunc, SourceLocation());
-}
-
Sema::OwningExprResult Sema::ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
SourceLocation KWLoc,
SourceLocation LParen,