[PATCH] Use 'auto' with 'new' expressions

Manuel Klimek klimek at google.com
Tue Apr 2 12:21:23 PDT 2013


  LG


================
Comment at: cpp11-migrate/UseAuto/UseAutoActions.cpp:35
@@ -33,3 +34,3 @@
   // Skip expressions with cleanups from the initializer expression.
   if (const ExprWithCleanups *E = dyn_cast<ExprWithCleanups>(ExprInit))
     ExprInit = E->getSubExpr();
----------------
Just a note: in the future, we'll want a matcher that drills through those - I think there are also other nodes you'd want to drill through here, but I don't remember exactly which ones of the top of my head. (I've just deja-vu'ed in that I've seen similar code written elsewhere ;)
Perhaps add a FIXME?

================
Comment at: cpp11-migrate/UseAuto/UseAutoMatchers.cpp:270
@@ +269,3 @@
+                 pointsTo(
+                   parenType(innerType(functionType()))
+                 )
----------------
Just noticed the surprising name of innerType while reviewing this :) Nothing to do with this patch of course, feel free to change afterwards (but I think we really want to change it).


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

BRANCH
  new

ARCANIST PROJECT
  clang-tools-extra



More information about the cfe-commits mailing list