[PATCH] D72458: [clangd] Adjust diagnostic range to be inside main file
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 9 09:08:37 PST 2020
kadircet marked 2 inline comments as done.
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:342
+ llvm::Optional<Note> NoteInsideMainFile;
+ for (auto &N : D.Notes) {
+ if (!N.InsideMainFile)
----------------
ilya-biryukov wrote:
> NIT: arguably simpler with the standard algorithm
> ```
> auto It = llvm::find_if(D.Notes, [](const Node&N) { return N.InsideMainFile; });
> assert(It != D.Notes.end());
> ```
>
> Up to you.
agreed, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72458/new/
https://reviews.llvm.org/D72458
More information about the cfe-commits
mailing list