-  TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));
+  if (clang::TypeSourceInfo *TSI = D->getTypeSourceInfo()) {
+    TRY_TO(TraverseTypeLoc(TSI->getTypeLoc()));
+  }

I assume the above is triggered by implicit nodes missing the type source
info in some cases. Does the test case cover this?

Cheers,
/Manuel

On Tue, Jun 5, 2012 at 1:37 AM, James Dennett <[email protected]> wrote:

> Sometimes an AST visitor can be most straightforward if it can assume that
> all decls that are referred to have been visited.  The current code doesn't
> visit such nodes.  With the attached patch they are visited if an AST
> visitor asks for it; this should have no effect for existing visitors
> (unless they coincidentally happen to have a member
> called shouldVisitImplicitDeclarations).
>
> Any/all comments are welcome.
>
> -- James
>
>
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to