[PATCH] D151833: Respect "-fdiagnostics-absolute-paths" on emit include location
Charalampos Mitrodimas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 2 08:05:41 PDT 2023
charmitro 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:
----------------
tbaeder wrote:
> 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]]`?
Yes, that way we are testing if the warning contains the correct filename+LOC.
Something like: `// NORMAL: In file included from {{.*absolute-paths.c:4}}:`.
But why changefrom `ABSOLUTE:` to `NORMAL-NOT`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151833/new/
https://reviews.llvm.org/D151833
More information about the cfe-commits
mailing list