[cfe-dev] Recursive AST Visitor

beni sonaldanak at gmail.com
Sun Feb 10 09:05:57 PST 2013


I am trying to recursively visit all node in the AST and count the number of
functions in my code.
However, the AST visitor counts functions in the header files as well such
as in "include<stdio.h>".
Is there anyway to exclude the header files from this?

I get this error when I run the recursive visitor on my code which is due to
the included files:

1.	/usr/include/libio.h:417:1: current parser token 'extern'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
clang: note: diagnostic msg: Error generating preprocessed source(s).

View this message in context: http://clang-developers.42468.n3.nabble.com/Recursive-AST-Visitor-tp4030399.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list