[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
  #include "foo/test.h"
  $ 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


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63648/new/

https://reviews.llvm.org/D63648





More information about the cfe-commits mailing list