Author: sammccall Date: Wed Nov 7 05:21:09 2018 New Revision: 346312 URL: http://llvm.org/viewvc/llvm-project?rev=346312&view=rev Log: [clangd] Fix mainfile filtering for diagnostics: don't emit diagnostics for builtin headers. (Relevant for clang-tidy)
Modified: clang-tools-extra/trunk/clangd/Diagnostics.cpp Modified: clang-tools-extra/trunk/clangd/Diagnostics.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Diagnostics.cpp?rev=346312&r1=346311&r2=346312&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/Diagnostics.cpp (original) +++ clang-tools-extra/trunk/clangd/Diagnostics.cpp Wed Nov 7 05:21:09 2018 @@ -79,7 +79,7 @@ Range diagnosticRange(const clang::Diagn } bool isInsideMainFile(const SourceLocation Loc, const SourceManager &M) { - return Loc.isValid() && M.isInMainFile(Loc); + return Loc.isValid() && M.isWrittenInMainFile(Loc); } bool isInsideMainFile(const clang::Diagnostic &D) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits