summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-26 20:35:59 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-26 20:35:59 +0000
commit34147278eafdd7f42ac06637c7168af221379772 (patch)
treee9b6b98ae226f4d59102549e515cf5be2f4d187f /clang/lib/Sema/SemaOverload.cpp
parente17606d513f75a454c34c1e625b4f1653b204644 (diff)
downloadbcm5719-llvm-34147278eafdd7f42ac06637c7168af221379772.tar.gz
bcm5719-llvm-34147278eafdd7f42ac06637c7168af221379772.zip
Eliminate the non-InitializedEntity PerformCopyInitialization() and
re-route its only caller to the newer PerformCopyInitialization(). We're down to one remaining caller of Sema::CheckReferenceInit. llvm-svn: 99650
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 410bf9a7c1e..bb67a759726 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -2201,44 +2201,6 @@ Sema::TryCopyInitialization(Expr *From, QualType ToType,
}
}
-/// PerformCopyInitialization - Copy-initialize an object of type @p ToType with
-/// the expression @p From. Returns true (and emits a diagnostic) if there was
-/// an error, returns false if the initialization succeeded. Elidable should
-/// be true when the copy may be elided (C++ 12.8p15). Overload resolution works
-/// differently in C++0x for this case.
-bool Sema::PerformCopyInitialization(Expr *&From, QualType ToType,
- AssignmentAction Action, bool Elidable) {
- if (!getLangOptions().CPlusPlus) {
- // In C, argument passing is the same as performing an assignment.
- QualType FromType = From->getType();
-
- AssignConvertType ConvTy =
- CheckSingleAssignmentConstraints(ToType, From);
- if (ConvTy != Compatible &&
- CheckTransparentUnionArgumentConstraints(ToType, From) == Compatible)
- ConvTy = Compatible;
-
- return DiagnoseAssignmentResult(ConvTy, From->getLocStart(), ToType,
- FromType, From, Action);
- }
-
- if (ToType->isReferenceType())
- return CheckReferenceInit(From, ToType,
- /*FIXME:*/From->getLocStart(),
- /*SuppressUserConversions=*/false,
- /*AllowExplicit=*/false,
- /*ForceRValue=*/false);
-
- if (!PerformImplicitConversion(From, ToType, Action,
- /*AllowExplicit=*/false, Elidable))
- return false;
- if (!DiagnoseMultipleUserDefinedConversion(From, ToType))
- return Diag(From->getSourceRange().getBegin(),
- diag::err_typecheck_convert_incompatible)
- << ToType << From->getType() << Action << From->getSourceRange();
- return true;
-}
-
/// TryObjectArgumentInitialization - Try to initialize the object
/// parameter of the given member function (@c Method) from the
/// expression @p From.
OpenPOWER on IntegriCloud