summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-05-12 00:28:35 +0000
committerBill Wendling <isanbard@gmail.com>2012-05-12 00:28:35 +0000
commite2f692bd189cfdf562175b786fe92c87ecdfcbfb (patch)
tree7e87711c6f0f484373ffa378964b34d7e0c8eb52 /include
parent0b3707c66993e57868b5480e79a9e0707c987dc0 (diff)
Merging r155218:
------------------------------------------------------------------------ r155218 | rsmith | 2012-04-20 11:46:14 -0700 (Fri, 20 Apr 2012) | 5 lines Fix bug where a class's (deleted) copy constructor would be implicitly given a non-const reference parameter type if the class had any subobjects with deleted copy constructors. This causes a rejects-valid if the class's copy constructor is explicitly defaulted (as happens for some implementations of std::pair etc). ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Sema/Sema.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 8ac7c3ee01..ca4b7096de 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -653,23 +653,19 @@ public:
/// SpecialMemberOverloadResult - The overloading result for a special member
/// function.
///
- /// This is basically a wrapper around PointerIntPair. The lowest bit of the
- /// integer is used to determine whether we have a parameter qualification
- /// match, the second-lowest is whether we had success in resolving the
- /// overload to a unique non-deleted function.
- ///
- /// The ConstParamMatch bit represents whether, when looking up a copy
- /// constructor or assignment operator, we found a potential copy
- /// constructor/assignment operator whose first parameter is const-qualified.
- /// This is used for determining parameter types of other objects and is
- /// utterly meaningless on other types of special members.
+ /// This is basically a wrapper around PointerIntPair. The lowest bits of the
+ /// integer are used to determine whether overload resolution succeeded, and
+ /// whether, when looking up a copy constructor or assignment operator, we
+ /// found a potential copy constructor/assignment operator whose first
+ /// parameter is const-qualified. This is used for determining parameter types
+ /// of other objects and is utterly meaningless on other types of special
+ /// members.
class SpecialMemberOverloadResult : public llvm::FastFoldingSetNode {
public:
enum Kind {
NoMemberOrDeleted,
Ambiguous,
- SuccessNonConst,
- SuccessConst
+ Success
};
private:
@@ -685,9 +681,6 @@ public:
Kind getKind() const { return static_cast<Kind>(Pair.getInt()); }
void setKind(Kind K) { Pair.setInt(K); }
-
- bool hasSuccess() const { return getKind() >= SuccessNonConst; }
- bool hasConstParamMatch() const { return getKind() == SuccessConst; }
};
/// \brief A cache of special member function overload resolution results
@@ -1909,11 +1902,9 @@ public:
DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class);
CXXConstructorDecl *LookupDefaultConstructor(CXXRecordDecl *Class);
CXXConstructorDecl *LookupCopyingConstructor(CXXRecordDecl *Class,
- unsigned Quals,
- bool *ConstParam = 0);
+ unsigned Quals);
CXXMethodDecl *LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals,
- bool RValueThis, unsigned ThisQuals,
- bool *ConstParam = 0);
+ bool RValueThis, unsigned ThisQuals);
CXXConstructorDecl *LookupMovingConstructor(CXXRecordDecl *Class);
CXXMethodDecl *LookupMovingAssignment(CXXRecordDecl *Class, bool RValueThis,
unsigned ThisQuals);