<source>:1:10: error: 'llvm/ADT/SmallVector.h' file not found [clang-diagnostic-error]
#include <llvm/ADT/SmallVector.h>
^
2 errors generated.
Error while processing <source>.
Found compiler error(s).
And I thought if clang can digest code than so should clang-tidy - especially clang-diagnostic-error should not happen in clang-tidy anymore after clang passes.
So the -Ipath/to/llvm/includes does not end up in the compile_flags.txt here
https://github.com/mattgodbolt/compiler-explorer/blob/master/lib/tooling/clang-tidy-tool.js#L57
and isn't passed to clang-tidy as -extra-arg=-Ipath/to/llvm/includes, either.
For me locally I got this ironed out with this commit
https://github.com/pseyfert/compiler-explorer/commit/409ad31604a65694a86e8f861bb66a001a40054f,
i.e. copy and pasting the code from base-compiler.js that is responsible for getting the -I flags from the selected libraries into clang-tidy-tool.js.
I'm still early in testing if that's exactly what I want and haven't sent it into production yet, but I suspect you'll have a better way to pass include paths to clang-tidy than code duplication between base-compiler.js and clang-tidy-tool.js.
What do you think? (about the bodge or the underlying issue)
Greetings,
Paul
--
You received this message because you are subscribed to the Google Groups "Compiler Explorer Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to compiler-explorer-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/compiler-explorer-development/428f5426-ed94-4db6-aba3-32f66f314c55%40googlegroups.com.
Matt