projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d32d749
)
[clangd] Respect clang-tidy SystemHeaders option if specified
author
Sam McCall
<sam.mccall@gmail.com>
Wed, 11 Jan 2023 17:03:58 +0000
(18:03 +0100)
committer
Sam McCall
<sam.mccall@gmail.com>
Wed, 11 Jan 2023 17:04:42 +0000
(18:04 +0100)
(Previous commit assumed it was always off, which is the default)
clang-tools-extra/clangd/ParsedAST.cpp
patch
|
blob
|
history
diff --git
a/clang-tools-extra/clangd/ParsedAST.cpp
b/clang-tools-extra/clangd/ParsedAST.cpp
index
637cada
..
d10da8c
100644
(file)
--- a/
clang-tools-extra/clangd/ParsedAST.cpp
+++ b/
clang-tools-extra/clangd/ParsedAST.cpp
@@
-542,8
+542,8
@@
ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
// NOLINT comments)?
return DiagnosticsEngine::Ignored;
}
- // Match behavior for clang-tidy --system-headers=0 (the default).
-
if (
Info.hasSourceManager() &&
+ if (!CTContext->getOptions().SystemHeaders.value_or(false) &&
+
Info.hasSourceManager() &&
Info.getSourceManager().isInSystemMacro(Info.getLocation()))
return DiagnosticsEngine::Ignored;