Translates code that Clang
understands into Infer's intermediate representation language IR.Sil
.
All modules: ClangFrontend
Start at ClangFrontend.Capture
for how Infer uses Clang to parse source files, using our Clang plugin. For more information on our clang plugin itself, refer to the relevant documentation in facebook-clang-plugins
:
example.cpp
) source file with construct that needs to be exported. The smaller the better.libtooling/ASTExporter.h
. For more information, refer to the ATD_GUIDELINES
.facebook-clang-plugins
. Running make
from top level of Infer repository will do that. Sometimes there may be compilation errors due to .atd
file changes --they need to be fixed..bdump
files: infer -g -- clang -c example.cpp && sh example.cpp.ast.sh
. Then open example.cpp.ast.bdump
.clang -c example.cpp -Xclang -ast-dump
. It doesn't include all the information that Infer sees, but it's often a good place to start.bdump
is failing (it happens on huge sources sometimes), there is a way to view it in "Yojson" format. To do that, replace all occurrences of BiniouASTExporter
with YojsonASTExporter
in the .ast.sh
debug script.