diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-23 20:55:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-23 20:55:32 +0000 |
commit | 51bebc83e74001ed0412d82aadae9eb247fee2d4 (patch) | |
tree | 57a7c5823fb7daed74616f8bb5fbd2020bc2d4d1 /lib/Sema/SemaExprCXX.cpp | |
parent | f7469a38ca835681a64959d71c4792d93a7b1d00 (diff) |
This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 79909b557d..f500e132de 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -996,6 +996,15 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType, const char *Flavor, bool AllowExplicit, bool Elidable) { ImplicitConversionSequence ICS; + return PerformImplicitConversion(From, ToType, Flavor, AllowExplicit, + Elidable, ICS); +} + +bool +Sema::PerformImplicitConversion(Expr *&From, QualType ToType, + const char *Flavor, bool AllowExplicit, + bool Elidable, + ImplicitConversionSequence& ICS) { ICS.ConversionKind = ImplicitConversionSequence::BadConversion; if (Elidable && getLangOptions().CPlusPlus0x) { ICS = TryImplicitConversion(From, ToType, |