[PATCH] D64863: [clangd] Ignore diags from builtin files
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 00:55:33 PDT 2019
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:473
+ SourceManager &SM = Info.getSourceManager();
+ if (!InsideMainFile && SM.isWrittenInBuiltinFile(Info.getLocation())) {
+ IgnoreDiagnostics::log(DiagLevel, Info);
----------------
ilya-biryukov wrote:
> There is also at least `isWrittenInCommandLineFile` and `isWrittenInScratchSpace`.
> We should probably handle both of them here too.
>
> What are we actually checking here? That we can later create a URI for this file? Is there a good way to check exactly that without breaking layering?
shall we put this into the `isInsideMainFile`? I think the location written in CommandLineFile/ScratchSpace is not inside main file logically.
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