[PATCH] D151833: Respect "-fdiagnostics-absolute-paths" on emit include location

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 07:56:21 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/test/Frontend/absolute-paths.c:6
+// NORMAL: In file included from [[ROOT_ABSOLUTE]]:4:
+// ABSOLUTE: In file included from [[ROOT_ABSOLUTE]]:4:
 
----------------
charmitro wrote:
> tbaeder wrote:
> > This checks the same thing in both cases, but in the `NORMAL` case, it should //not// use the absolute path, shouldn't it?
> You're correct. I was constantly testing it from the same path.
> 
> Since the relative path is going to be different depending on where you running from, would it be wise to accept a regular expression of any string in the `NORMAL` case?
> 
> For example, 
> ```
> NORMAL: In file included from {{.*}}:
> ```
I wonder if it would make sense to just check for the filename in the `NORMAL` case and then do a `NORMAL-NOT: [[ROOT_ABSOLUTE]]`?


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

https://reviews.llvm.org/D151833



More information about the cfe-commits mailing list