[PATCH] Fix useAuto replacing variable declaration lists containing non-initialized variables.

Edwin Vane edwin.vane at intel.com
Fri May 17 06:25:20 PDT 2013



================
Comment at: cpp11-migrate/UseAuto/UseAutoMatchers.cpp:238
@@ +237,3 @@
+  return declStmt(
+    has(varDecl()),
+    unless(
----------------
Ariel Bernal wrote:
> Edwin Vane wrote:
> > What's the purpose of this part?
> I can add a comment if you think it is necessary. We have to explicitly say that there's at least one varDecl in the declStmt meaning that the declStmt is a declaration list, otherwise we could match declaration statements that don't have any varDecl within e.g. using directives or typedefs.
Ok cool. Then just add a comment to that effect.


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



More information about the cfe-commits mailing list