[cfe-users] Missing header files in AST display
Raphael Isemann via cfe-users
cfe-users at lists.llvm.org
Wed Aug 2 13:46:02 PDT 2017
Do you mean the default include paths? Not sure how the Windows
version is handling this, but if a normal clang compilation works for
you, then this should make the ast-dump working with all include
clang -Xclang -ast-dump -fsyntax-only -I/your/usual/extra/paths test.c
Note that there is no -cc1 but instead we only add the -ast-dump to
the -cc1 invocation via -Xclang. This way you also get your default
include paths from the driver.
Otherwise you should write an example invocation that fails to find a
certain header in a certain path, because with the current information
it's hard to say what exactly is going wrong.
2017-08-02 20:07 GMT+02:00 Ray Mitchell via cfe-users
<cfe-users at lists.llvm.org>:
> I can currently successfully compile and link C and C++ code on my Windows
> 10 system but I would also like to be able to separately generate the AST
> for each file. The command line below does display much of the AST but it
> contains errors regarding missing header files that my files have included.
> For normal compiling I use the -I dir option in the standard way to specify
> header file paths but that does not seem to work with the command line
> below. How should this be done?
> clang -cc1 -ast-dump test.c
> cfe-users mailing list
> cfe-users at lists.llvm.org
More information about the cfe-users