[PATCH] D64863: [clangd] Ignore diags from builtin files

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 28 23:49:35 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:563
     FillDiagBase(*LastDiag);
-    adjustDiagFromHeader(*LastDiag, Info, *LangOpts);
+    if (!InsideMainFile)
+      LastDiagWasAdjusted = adjustDiagFromHeader(*LastDiag, Info, *LangOpts);
----------------
ilya-biryukov wrote:
> kadircet wrote:
> > ilya-biryukov wrote:
> > > We probably want to **always** set the value of this field to avoid accidentally reading the flag for the previous `LastDiag`
> > I don't follow, this is always set in line `475` at the beginning of `HandleDiagnostic` method.
> I might be missing something, but the only assignment to `LastDiagWasAdjusted` seems to be here (apart from initialization at the declaration site)
oopsy, fixed


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64863/new/

https://reviews.llvm.org/D64863





More information about the cfe-commits mailing list