[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 10:33:37 PDT 2019
thakis added a comment.
>> Those aren't diagnostics, so that's not surprising.
> What would suggest in that case? Add a new `-fpreprocessor-absolute-paths` option? Or change the name of `-fdiagnostics-absolute-paths` for another name that applies to both diagnostics and the preprocessor output?
clang uses the absolute-ness you use on the input. If you pass absolute paths to clang and to -I, then --show-includes etc will print absolute paths:
$ cat test.cc
$ out/gn/bin/clang-cl /showIncludes /c test.cc
Note: including file: ./foo/test.h
$ out/gn/bin/clang-cl /showIncludes /c test.cc -I$PWD
Note: including file: /Users/thakis/src/llvm-project/foo/test.h
CHANGES SINCE LAST ACTION
More information about the cfe-commits