mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-16 07:49:43 +00:00
[clangd] Respect clang-tidy SystemHeaders option if specified
(Previous commit assumed it was always off, which is the default)
This commit is contained in:
parent
d32d749b11
commit
9b16c624ed
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user