diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-03 19:09:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-03 19:09:14 +0000 |
commit | 2fe9883a961dfa872b0a20e8b56e7bf65fc98b6f (patch) | |
tree | 531be31c1fde3c0c9659e1c677968dd8da52dced /clang/lib/Sema/SemaOverload.h | |
parent | 4d0549e3be84ae5645c1d6f4745c276e5bb69289 (diff) | |
download | bcm5719-llvm-2fe9883a961dfa872b0a20e8b56e7bf65fc98b6f.tar.gz bcm5719-llvm-2fe9883a961dfa872b0a20e8b56e7bf65fc98b6f.zip |
Standard conversion sequences now have a CopyConstructor field, to
cope with the case where a user-defined conversion is actually a copy
construction, and therefore can be compared against other standard
conversion sequences. While I called this a hack before, now I'm
convinced that it's the right way to go.
Compare overloads based on derived-to-base conversions that invoke
copy constructors.
Suppress user-defined conversions when attempting to call a
user-defined conversion.
llvm-svn: 58629
Diffstat (limited to 'clang/lib/Sema/SemaOverload.h')
-rw-r--r-- | clang/lib/Sema/SemaOverload.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOverload.h b/clang/lib/Sema/SemaOverload.h index 2fd6b1fb3e5..af3d1b407eb 100644 --- a/clang/lib/Sema/SemaOverload.h +++ b/clang/lib/Sema/SemaOverload.h @@ -18,6 +18,7 @@ #include "llvm/ADT/SmallVector.h" namespace clang { + class CXXConstructorDecl; class FunctionDecl; /// ImplicitConversionKind - The kind of implicit conversion used to @@ -114,6 +115,13 @@ namespace clang { /// is an opaque pointer that can be translated into a QualType. void *ToTypePtr; + /// CopyConstructor - The copy constructor that is used to perform + /// this conversion, when the conversion is actually just the + /// initialization of an object via copy constructor. Such + /// conversions are either identity conversions or derived-to-base + /// conversions. + CXXConstructorDecl *CopyConstructor; + void setAsIdentityConversion(); ImplicitConversionRank getRank() const; bool isPointerConversionToBool() const; |