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

Manuel Klimek reviews at llvm-reviews.chandlerc.com
Thu Aug 23 13:34:02 PDT 2012



================
Comment at: unittests/Tooling/RecursiveASTVisitorTest.cpp:413-416
@@ +412,6 @@
+  // to use them in order to force them to appear in the AST.
+  EXPECT_TRUE(Visitor.runOver(
+      "struct WithCtor { WithCtor(); }; \n"
+      "struct Simple { Simple(); WithCtor w; }; \n"
+      "int main() { Simple s; Simple t(s); }\n"));
+}
----------------
I'd probably quickly add a EXPECT_FALSE for everything but the copy constructor, so that we are actually sure the test passes for the right reason.


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



More information about the cfe-commits mailing list