[cfe-commits] [PATCH] Allow RecursiveASTVisitor to visit implicit ctor initializers (for which isWritten() returns false)

Richard Smith reviews at llvm-reviews.chandlerc.com
Thu Aug 23 14:23:42 PDT 2012



================
Comment at: unittests/Tooling/RecursiveASTVisitorTest.cpp:414-415
@@ +413,4 @@
+  EXPECT_TRUE(Visitor.runOver(
+      "struct WithCtor { WithCtor(); }; \n"
+      "struct Simple { Simple(); WithCtor w; }; \n"
+      "int main() { Simple s; Simple t(s); }\n"));
----------------
A comment explaining the purpose of the declarations of the default constructors would be useful. Alternatively, how about passing Simple &s as an argument to your function below, or using an "extern Simple s" global?


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



More information about the cfe-commits mailing list