[cfe-commits] Patch: allow RecursiveASTVisitor to visit implicit ctor initializers (for which isWritten() returns false)
James Dennett
jdennett at googlers.com
Thu Aug 23 12:19:31 PDT 2012
Now that we have RecursiveASTVisitor::shouldVisitImplicitCode(), it
would be good to allow RAV to visit CXXCtorInitializer objects for
which isWritten() returns false (i.e., the initializers that are
implicitly added -- in C++98 that can happen because the user didn't
mention a direct subobject that has a constructor, I'm not sure if it
can also happen in C++11 when NSDMIs are used).
The change to do this is a one-liner in
RecursiveASTVisitor<T>::TraverseConstructorInitializer. This is the
only use of isWritten() in RAV.
The attached patch includes a test for the new functionality.
Comments on either style or substance would be appreciated.
-- James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rav-iswritten.patch
Type: application/octet-stream
Size: 2156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120823/9df4ae41/attachment.obj>
More information about the cfe-commits
mailing list