[PATCH] D143096: [clangd] Provide patched diagnostics with preamble patch
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 8 00:45:58 PST 2023
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/Preamble.cpp:648
+ });
+ if (NotePointsToOutside)
+ return true;
----------------
Oh yeah, one more thing :-)
Currently if the note/fix aren't at this line we're bailing out of the diagnostic entirely.
We have three behaviors available:
1. patch the note/fix range as best we can and emit it
2. drop the note/fix but keep the diagnostic
3. drop the diagnostic entirely
I think we should generally prefer 1 when we can, maybe there's a case for choosing 2 sometimes (heuristics about when diagnostics have probably been invalidated, with comments), and we should ~never do 3.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143096/new/
https://reviews.llvm.org/D143096
More information about the cfe-commits
mailing list