[all-commits] [llvm/llvm-project] 2e25be: [clangd] Add main file macros into the main-file i...
Aleksandr Platonov via All-commits
all-commits at lists.llvm.org
Thu Jan 14 04:15:37 PST 2021
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 2e25be0b6134e9544f7cee7bb7b31a921ca37cc0
https://github.com/llvm/llvm-project/commit/2e25be0b6134e9544f7cee7bb7b31a921ca37cc0
Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
Date: 2021-01-14 (Thu, 14 Jan 2021)
Changed paths:
M clang-tools-extra/clangd/CollectMacros.cpp
M clang-tools-extra/clangd/CollectMacros.h
M clang-tools-extra/clangd/SemanticHighlighting.cpp
M clang-tools-extra/clangd/XRefs.cpp
M clang-tools-extra/clangd/index/SymbolCollector.cpp
M clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
M clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
Log Message:
-----------
[clangd] Add main file macros into the main-file index.
This patch is a try to fix `WorkspaceSymbols.Macros` test after D93796.
If a macro definition is in the preamble section, then it appears to be in the preamble (static) index and not in the main-file (dynamic) index.
Thus, a such macro could not be found at a symbol search according to the logic that we skip symbols from the static index if the location of these symbols is inside the dynamic index files.
To fix this behavior this patch adds main file macros into the main-file (dynamic) index.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D94477
More information about the All-commits
mailing list