aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-02-25 08:52:25 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-02-25 08:52:25 +0000
commit30028234f38945981ebf9c8a2cb915fc2f9a63a4 (patch)
tree093913b5dee2354c3a8a81ce59acd45459ec5a27 /lib/Sema/SemaInit.cpp
parent79ac241f0b4b5a653adb7e07292d7b00c5cb92ff (diff)
Rough fix for PR9323 that prevents Clang from marking copy constructor
declarations as referenced when in fact we're not going to even form a call in the AST. This is significant because we attempt to allow as an extension classes with intentionally private and undefined copy constructors to have temporaries bound to references, and so shouldn't warn about the lack of definition for that copy constructor when the class is internal. Doug, John wasn't really satisfied with the presence of overloading at all. This is a stop-gap and there may be a better solution. If you can give me some hints for how you'd prefer to see this solved, I'll happily switch things over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 6a1bc97de7..d43ce5bb49 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -3478,7 +3478,9 @@ static ExprResult CopyObject(Sema &S,
}
OverloadCandidateSet::iterator Best;
- switch (CandidateSet.BestViableFunction(S, Loc, Best)) {
+ switch (CandidateSet.BestViableFunction(S, Loc, Best,
+ /*UserDefinedConversion=*/ false,
+ IsExtraneousCopy)) {
case OR_Success:
break;