[cfe-dev] RecursiveASTVisitor tutorial + counting nodes in AST?

Aaron W. Hsu arcfide at sacrideo.us
Wed Oct 1 11:44:31 PDT 2014


Dear James:

After some consideration on what you said about threading data through
to reach the visitor's constructor and changing to a different use of
newFrontendActionFactory, to use newASTConsumer instead of
createASTConsumer, I've been able to get things working correctly. Thank
you. The solution was to thread through the pointer to the integer
holding the count through an explicitly created frontendaction that
passed that pointer through to the consumer constructor when called,
which in turn passes that through to the visitor.

     Yours truly,

          Aaron W. Hsu

-- 
Aaron W. Hsu | arcfide at sacrideo.us | http://www.sacrideo.us
Please support my work: https://www.gratipay.com/arcfide/
לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃




More information about the cfe-dev mailing list