[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-11 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG02ec6ff77eb7: [clangd] Use name of Macro to compute its SymbolID, NFC. (authored by usaxena95, committed by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228431. usaxena95 added a comment. Hopefully reverting unintended changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228430. usaxena95 added a comment. - [clangd] Store xref for Macros in ParsedAST. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AS

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for not reading through and assuming the wrong thing from the title. Thanks for the explanation! LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 __

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added a comment. We actually use both the name and the **source location** of the macro to calculate its ID. I see that the subject of the patch might suggest otherwise. This is a trivial change which just changes the params of the function so that users don't have to carry the Identi

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D69937#1736980 , @ilya-biryukov wrote: > Does that mean we identify each macro merely by its name? > It's not uncommon to have multiple `#define` for the same name, meaning > completely different things. > > If find references

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Does that mean we identify each macro merely by its name? It's not uncommon to have multiple `#define` for the same name, meaning completely different things. If find references shows all of those, it's not very useful... Repository: rG LLVM Github Monorepo CH

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228220. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/c

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. there are some unrelated changes in this patch (probably trigger by your editor setting?), though they are trivial, I would avoid these changes in a same patch. Comment at:

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We use the name from the IdentifierInfo of the Macro to compute its SymbolID. It is better to just take t