summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-10-29 02:00:59 +0000
committerDouglas Gregor <dgregor@apple.com>2008-10-29 02:00:59 +0000
commit786ab2119f288bd00e0c6583ecf46e90ecfa6a5c (patch)
tree10ce91f7f6fa40021f3c8fe665b97b8e22c01abb /clang/lib/Sema/SemaOverload.h
parentcfa9d8e9a086287d11326b59e61a3200cbbf812a (diff)
downloadbcm5719-llvm-786ab2119f288bd00e0c6583ecf46e90ecfa6a5c.tar.gz
bcm5719-llvm-786ab2119f288bd00e0c6583ecf46e90ecfa6a5c.zip
Tweak Sema::CheckReferenceInit so that it (optionally) computes an
ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. llvm-svn: 58357
Diffstat (limited to 'clang/lib/Sema/SemaOverload.h')
-rw-r--r--clang/lib/Sema/SemaOverload.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOverload.h b/clang/lib/Sema/SemaOverload.h
index 27190f6e996..558718c0d94 100644
--- a/clang/lib/Sema/SemaOverload.h
+++ b/clang/lib/Sema/SemaOverload.h
@@ -38,6 +38,7 @@ namespace clang {
ICK_Pointer_Conversion, ///< Pointer conversions (C++ 4.10)
ICK_Pointer_Member, ///< Pointer-to-member conversions (C++ 4.11)
ICK_Boolean_Conversion, ///< Boolean conversions (C++ 4.12)
+ ICK_Derived_To_Base, ///< Derived-to-base (C++ [over.best.ics][)
ICK_Num_Conversion_Kinds ///< The number of conversion kinds
};
@@ -91,9 +92,9 @@ namespace clang {
/// Third - The third conversion can be a qualification conversion.
ImplicitConversionKind Third : 8;
- /// Deprecated - Whether this is a deprecated conversion, such as
- /// converting a string literal to a pointer to non-const
- /// character data (C++ 4.2p2).
+ /// Deprecated - Whether this the deprecated conversion of a
+ /// string literal to a pointer to non-const character data
+ /// (C++ 4.2p2).
bool Deprecated : 1;
/// FromType - The type that this conversion is converting
@@ -154,7 +155,17 @@ namespace clang {
};
/// ConversionKind - The kind of implicit conversion sequence.
- Kind ConversionKind;
+ /// As usual, we use "unsigned" here because VC++ makes enum bitfields
+ /// signed.
+ unsigned ConversionKind : 2;
+
+ /// ReferenceBinding - True when this is a reference binding
+ /// (C++ [over.ics.ref]).
+ bool ReferenceBinding : 1;
+
+ /// DirectBinding - True when this is a reference binding that is a
+ /// direct binding (C++ [dcl.init.ref]).
+ bool DirectBinding : 1;
union {
/// When ConversionKind == StandardConversion, provides the
OpenPOWER on IntegriCloud