[cfe-dev] My first patch to clang

Ivan Sorokin sorokin at rain.ifmo.ru
Sat Dec 5 09:52:57 PST 2009

Chris Lattner wrote:
> "pointer to a record type for which the field would be valid".  We  
> might as well test that the field makes sense as well.
> Thanks again for working on this, it's great to get this enhancement,
You need also to check if class has overloaded operator->.

Look at this example:

struct a
  int b;

struct c
  a * operator->();

  int d;

int main()
  c * c;
  c.d;    // do not try to suggest replacement for c->d (!)
  return 0;

More information about the cfe-dev mailing list