[cfe-commits] r74205 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Jun 26 09:16:43 PDT 2009
On Jun 26, 2009, at 8:36 AM, Douglas Gregor wrote:
>>
>> + // C++[class.copy] p210
>
> p10 :)
I did mean p210, as in page 210. But I guess, it should be the
paragraph number here. So, changed to p12.
>>
>> + AddMemberOperatorCandidates(clang::OO_Equal, SourceLocation(),
>> Args, 2,
>> + CandidateSet);
>> + OverloadCandidateSet::iterator Best;
>> + if (BestViableFunction(CandidateSet,
>> + ClassDecl->getLocation(), Best) ==
>> OR_Success)
>> + return cast<CXXMethodDecl>(Best->Function);
>> + assert(false &&
>> + "getAssignOperatorMethod - copy assignment operator
>> method not found");
>> + return 0;
>> +}
>
> Asserting here is just a temporary measure, right? Because it's
> possible for one to find a deleted copy assignment operator (C++0x),
> and it may also be possible to end up with an ambiguity (but I can't
> come up with a test case, so I could be wrong about that).
I am expecting that I always find an unambiguous operator assign here.
Since, I alway start the lookup with an implicit assignment
operator already in place. But, I cannot be sure either. So, let's
have this assert in place and see if it exposes a bug in the future.
Checked in: http://llvm.org/viewvc/llvm-project?view=rev&revision=74287
- Fariborz
>
More information about the cfe-commits
mailing list