ToolInvocation does not see header file search paths

Hello!
I am collecting diagnostics from LLVM using this code:

1. llvm::IntrusiveRefCntPtr<clang::FileManager> fm(clang::FileSystemOptions());
2. std::unique_ptr<ASTAction> Action(new ASTAction(oIndexer));
3. clang::tooling::ToolInvocation ti(args, std::move(Action), fm.get());
4. ti.setDiagnosticConsumer(new DiagsClient(oIndexer));
5. ti.run();

I have a problem in that I only receive messages like “‘src / lib.h’ file not found”, although the paths to the header files are given.
What needs to be done so that ToolInvocation finds the header files?