summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Diagnostics.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-11-26 17:05:13 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-11-26 17:05:13 +0000
commite8ccb8238d1b817848f62fc00b370076c08ae373 (patch)
treed8a574ef23d9122add3b480762066855aadd9ee1 /clang-tools-extra/clangd/Diagnostics.cpp
parent105fc1a5f3b98273acaf58a5738f590f7668af30 (diff)
downloadbcm5719-llvm-e8ccb8238d1b817848f62fc00b370076c08ae373.tar.gz
bcm5719-llvm-e8ccb8238d1b817848f62fc00b370076c08ae373.zip
[clangd] Do not drop diagnostics from macros
if they still end up being in the main file. llvm-svn: 347574
Diffstat (limited to 'clang-tools-extra/clangd/Diagnostics.cpp')
-rw-r--r--clang-tools-extra/clangd/Diagnostics.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp
index 9a330f835ad..a8bfa29eec2 100644
--- a/clang-tools-extra/clangd/Diagnostics.cpp
+++ b/clang-tools-extra/clangd/Diagnostics.cpp
@@ -79,7 +79,7 @@ Range diagnosticRange(const clang::Diagnostic &D, const LangOptions &L) {
}
bool isInsideMainFile(const SourceLocation Loc, const SourceManager &M) {
- return Loc.isValid() && M.isWrittenInMainFile(Loc);
+ return Loc.isValid() && M.isWrittenInMainFile(M.getFileLoc(Loc));
}
bool isInsideMainFile(const clang::Diagnostic &D) {
OpenPOWER on IntegriCloud