[cfe-dev] Can clangtool handle "-I"?
Yafei Liu via cfe-dev
cfe-dev at lists.llvm.org
Tue Aug 4 04:12:28 PDT 2020
Hi Samins, that works for me, thank you.
On Tue, Aug 4, 2020 at 6:55 PM samins KAlex <rldoc at yandex.ru> wrote:
> Try using --extra-arg-before=-I'/path/to/clang/include' when run your tool
> Use CommonOptionsParser to access given flag:
> CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
> ClangTool Tool(OptionsParser.getCompilations(),
> 04.08.2020, 11:24, "Yafei Liu via cfe-dev" <cfe-dev at lists.llvm.org>:
> I'm writing a tool using AST matcher, and I need to pass the path of the
> clang built-in heads to my tool (or it will error me that "'stddef.h' file
> not found"), so I add `-I/path/to/the/headers` to my tool, but the program
> said that "Unknown command line argument
> So is there any built-in OptionCategory that can handle "-I" parameters?
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev