[PATCH] Introducing initial UseAuto transform

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 12 09:05:45 PST 2013



================
Comment at: cpp11-migrate/UseAuto/UseAutoActions.cpp:35
@@ +34,3 @@
+  // Drill down to the as-written initializer.
+  const Expr *E = Construct->arg_begin()->IgnoreParenImpCasts();
+
----------------
Is `IgnoreParenImpCasts()` needed here?  We will do it in the loop body anyway.

================
Comment at: test/cpp11-migrate/UseAuto/iterator.cpp:67-70
@@ +66,6 @@
+
+  // declarator-id is not the same type as initializer expression. No transform
+  // should happen.
+  std::vector<int>::iterator I2 = myI;
+  // CHECK: std::vector<int>::iterator I2 = myI;
+
----------------
So this transformation was not being done even without this change?


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



More information about the cfe-commits mailing list