[PATCH] Introducing initial UseAuto transform

Dmitri Gribenko gribozavr at gmail.com
Wed Feb 13 07:02:33 PST 2013


  I think it is correct to abort on a conversion operator.  And yes, you can get a call to a conversion operator where src type equals dest type, but it would be an explicit call:

  ```struct X {
     operator X();
  };
  ...
  X x;
  x.operator X();```

  The strictest condition is an implicit call to a conversion operator (because an explicit call can be rewritten to auto, the operator will be still called).  But these are pretty rare, so we can just stop if we see any conversion operator call.

  You can remove E2, by the way:

  ```if (E != E->IgnoreConversionOperator()) ...```

http://llvm-reviews.chandlerc.com/D392



More information about the cfe-commits mailing list