[clang] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 11:17:09 PDT 2025
AaronBallman wrote:
> Ok, looks like the clang-tidy test failure is related to the `-header-filter` option:
>
> ```c++
> // Check that `-header-filter` operates on the same file paths as paths in
> // diagnostics printed by ClangTidy.
> #include "dir1/dir2/../header_alias.h"
> // CHECK_HEADER_ALIAS: dir1/dir2/../header_alias.h:1:11: warning: single-argument constructors
> ```
>
> So, I guess my question is now, should the header filter apply to the original filename, the simplified filename, or both?
>
> @AaronBallman Thoughts? Or alternatively who do best ping for clang-tidy related questions?
CC @5chmidti @PiotrZSL @HerrCai0907 @LegalizeAdulthood for more opinions on this
I would naively expect that I'm giving the tool a path, the tool will resolve all symlinks and relative parts, etc for me same as it would do when specifying the file to compile/tidy.
https://github.com/llvm/llvm-project/pull/143520
More information about the cfe-commits
mailing list