mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 21:26:53 +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),
|
AllowEnablingAnalyzerAlphaCheckers(AllowEnablingAnalyzerAlphaCheckers),
|
||||||
EnableModuleHeadersParsing(EnableModuleHeadersParsing) {
|
EnableModuleHeadersParsing(EnableModuleHeadersParsing) {
|
||||||
// Before the first translation unit we can get errors related to command-line
|
// Before the first translation unit we can get errors related to command-line
|
||||||
// parsing, use empty string for the file name in this case.
|
// parsing, use dummy string for the file name in this case.
|
||||||
setCurrentFile("");
|
setCurrentFile("dummy");
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangTidyContext::~ClangTidyContext() = default;
|
ClangTidyContext::~ClangTidyContext() = default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user