diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-11-26 17:05:13 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-11-26 17:05:13 +0000 |
commit | e8ccb8238d1b817848f62fc00b370076c08ae373 (patch) | |
tree | d8a574ef23d9122add3b480762066855aadd9ee1 /clang-tools-extra/clangd/Diagnostics.cpp | |
parent | 105fc1a5f3b98273acaf58a5738f590f7668af30 (diff) | |
download | bcm5719-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.cpp | 2 |
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) { |