[clang] [clang-tools-extra] [clangd][clang-tidy] Factor out mergeFixits() logic and reuse it in clangd (PR #208682)
Zeyi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 04:33:56 PDT 2026
================
@@ -803,17 +803,26 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
}
// Otherwise, follow clang's behavior: no fixits in macros.
if (FixIt.RemoveRange.getBegin().isMacroID() ||
- FixIt.RemoveRange.getEnd().isMacroID())
+ FixIt.RemoveRange.getEnd().isMacroID() ||
+ !isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
----------------
zeyi2 wrote:
Nit: Could we keep the main-file check separate from the macro guard? It is unrelated to the preceding comment.
https://github.com/llvm/llvm-project/pull/208682
More information about the cfe-commits
mailing list