From a28097da4fbae525909886f348046e24248fd4c0 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 25 Feb 2011 08:52:25 +0000 Subject: 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. llvm-svn: 126480 --- clang/lib/Sema/SemaInit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaInit.cpp') diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 6a1bc97de79..d43ce5bb49c 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/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; -- cgit v1.2.3