We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf7c107 commit 8cef16aCopy full SHA for 8cef16a
clang-tools-extra/clangd/ParsedAST.cpp
@@ -406,7 +406,12 @@ std::vector<Fix>
406
clangTidyNoLintFixes(const clang::tidy::ClangTidyContext &CTContext,
407
const clang::Diagnostic &Info, const Diag &Diag) {
408
auto RuleName = CTContext.getCheckName(Diag.ID);
409
- if (RuleName.empty() || Diag.Severity >= DiagnosticsEngine::Error ||
+ if (
410
+ // If this isn't a clang-tidy diag
411
+ RuleName.empty() ||
412
+ // NOLINT does not work on Serverity Error or above
413
+ Diag.Severity >= DiagnosticsEngine::Error ||
414
+ // No point adding extra fixes if the Diag is for a different file
415
!Diag.InsideMainFile) {
416
return {};
417
}
0 commit comments