mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 06:46:33 +00:00
[clang-tidy] give dummy path when create ClangTidyContext (#134670)
#121323 changed the way the absolute path is computed. Empty file name will cause absolute path ignore current folder. This patch add "dummy" file name to avoid this issue Fixed: #134502
This commit is contained in:
parent
499930e38a
commit
5aae0ee660
@ -167,8 +167,8 @@ ClangTidyContext::ClangTidyContext(
|
||||
AllowEnablingAnalyzerAlphaCheckers(AllowEnablingAnalyzerAlphaCheckers),
|
||||
EnableModuleHeadersParsing(EnableModuleHeadersParsing) {
|
||||
// Before the first translation unit we can get errors related to command-line
|
||||
// parsing, use empty string for the file name in this case.
|
||||
setCurrentFile("");
|
||||
// parsing, use dummy string for the file name in this case.
|
||||
setCurrentFile("dummy");
|
||||
}
|
||||
|
||||
ClangTidyContext::~ClangTidyContext() = default;
|
||||
|
Loading…
x
Reference in New Issue
Block a user