#121323 changed the way the absolute path is computed.
This led to HeaderFilterRegex not picked up from the .clang-tidy file sitting at the current working directory. This has partially been fixed by #133582, but nevertheless this should be fixed here as well.
Before the PR:
Getting options for file ''
AbsolutePath: /path/to/root/
After the PR:
Getting options for file ''
AbsolutePath: /path/to/root
I.e. there is a missing trailing slash. This makes the addRawFileOptions no longer work, because it does this:
StringRef RootPath = llvm::sys::path::parent_path(AbsolutePath);
Since the AbsolutePath no longer has a slash, instead of picking /path/to/root as RootPath, it picks /path/to, and there is no .clang-tidy file there.