[cfe-commits] r80690 - in /cfe/trunk: include/clang/AST/DeclBase.h lib/Sema/IdentifierResolver.cpp
dgregor at apple.com
Tue Sep 1 10:31:55 PDT 2009
On Sep 1, 2009, at 10:27 AM, Ted Kremenek wrote:
> On Sep 1, 2009, at 10:22 AM, Douglas Gregor wrote:
>> Author: dgregor
>> Date: Tue Sep 1 12:22:34 2009
>> New Revision: 80690
>> URL: http://llvm.org/viewvc/llvm-project?rev=80690&view=rev
>> Add DeclContext::Equals to compare declaration contexts based on
>> their primary context. Use this instead of pointer comparisons
> Can we make pointer comparisons of DeclContext objects illegal
> (e.g., a private operator== method)?
Sadly, no :(
An overloaded operator has to have at least on parameter of class or
enumeration type (or reference to one of those). The signature we
would need, e.g.,
friend bool operator==(DeclContext *, DeclContext *);
does not qualify.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits