summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeComplete.cpp
diff options
context:
space:
mode:
authorUtkarsh Saxena <usx@google.com>2019-11-11 12:38:17 +0100
committerHaojian Wu <hokein.wu@gmail.com>2019-11-11 12:38:49 +0100
commit02ec6ff77eb718528138737c885e67c248ecae49 (patch)
treeadcce5c84745147d94a6dcc6b1331f3550fd9af9 /clang-tools-extra/clangd/CodeComplete.cpp
parent0cc7c29a97e401359782edf3263cdc1a130415d8 (diff)
downloadbcm5719-llvm-02ec6ff77eb718528138737c885e67c248ecae49.tar.gz
bcm5719-llvm-02ec6ff77eb718528138737c885e67c248ecae49.zip
[clangd] Use name of Macro to compute its SymbolID, NFC.
Summary: We use the name from the IdentifierInfo of the Macro to compute its SymbolID. It is better to just take the Name as a parameter to avoid storing the IdentifierInfo whenever we need the SymbolID for the Macro. Patch by UTKARSH SAXENA! Reviewers: hokein Reviewed By: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69937
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index db9f9cc0519..4ef9842a381 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -492,7 +492,7 @@ llvm::Optional<SymbolID> getSymbolID(const CodeCompletionResult &R,
return clang::clangd::getSymbolID(R.Declaration);
}
case CodeCompletionResult::RK_Macro:
- return clang::clangd::getSymbolID(*R.Macro, R.MacroDefInfo, SM);
+ return clang::clangd::getSymbolID(R.Macro->getName(), R.MacroDefInfo, SM);
case CodeCompletionResult::RK_Keyword:
return None;
}
OpenPOWER on IntegriCloud