[llvm-dev] AST of a program without any interference of semantic analyzer
Marcus Rodrigues via llvm-dev
llvm-dev at lists.llvm.org
Mon Sep 14 12:34:15 PDT 2015
Dear LLVMers,
I'm developing a tool to extract constraints from C programs. To do it, I
need, firstly, to be able to go over the Abstract Syntax Tree of a program.
Thus, I'm trying to use clang to get the AST of a program and start my
work from it. The problem that I'm having is that I don't know how I can
get the AST of a program without any intervention of the semantic analyzer.
I would like to analyze programs that have uses of undeclared variables.
However, once clang finds an undeclared variable, it stops building the
tree,
and just shows me the errors. If I need to modify clang, to continue
producing
the tree, e.g., assuming that every undeclared variable is extern, how can
I do it?
Or, in other words, is there a way to disable the semantic analysis
and get the AST of a program without any interference of the this analyzer?
Since now, thank you very much!
Regards,
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150914/9ced7614/attachment.html>
More information about the llvm-dev
mailing list