[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354761: [clangd] Enhance macro hover to see full definition (authored by malaperle, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. More concretely, here's the proposed API for the intermediate representation of formatted string: D58547 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H &&

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 187902. malaperle added a comment. Remove Markdown support. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && HoverSupportsMarkdown) { +

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && HoverSupportsMarkdown) { + (*H)->contents.kind = MarkupKind::Markdown;

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && HoverSupportsMarkdown) { +

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 187783. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:823 + (*H)->contents.value = + llvm::formatv("```C++\n{0}\n```", (*H)->contents.value); +} The contents of the hover is not strictly C++ code,

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Ping? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 185959. malaperle marked an inline comment as not done. malaperle added a comment. Remove temporary code. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files:

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 184928. malaperle marked 2 inline comments as done. malaperle added a comment. Herald added a project: clang. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-01-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/XRefs.cpp:578 +bool Invalid; +StringRef Buffer = SM.getBufferData(SM.getFileID(StartLoc), ); +if (!Invalid) { ilya-biryukov wrote: > ilya-biryukov wrote: > > malaperle wrote: > > > ilya-biryukov

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-01-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/XRefs.cpp:578 +bool Invalid; +StringRef Buffer = SM.getBufferData(SM.getFileID(StartLoc), ); +if (!Invalid) { ilya-biryukov wrote: > malaperle wrote: > > ilya-biryukov wrote: > > > Unfortunately

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-01-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/XRefs.cpp:578 +bool Invalid; +StringRef Buffer = SM.getBufferData(SM.getFileID(StartLoc), ); +if (!Invalid) { malaperle wrote: > ilya-biryukov wrote: > > Unfortunately we can't get the buffer

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-01-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked 2 inline comments as done. malaperle added inline comments. Comment at: clangd/XRefs.cpp:572 + + // Try to get the full definition, not just the name + SourceLocation StartLoc = Decl.Info->getDefinitionLoc(); simark wrote: > hokein wrote: > >

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/XRefs.cpp:578 +bool Invalid; +StringRef Buffer = SM.getBufferData(SM.getFileID(StartLoc), ); +if (!Invalid) { Unfortunately we can't get the buffer here, because for the preamble macros the

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-05 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/XRefs.cpp:572 + + // Try to get the full definition, not just the name + SourceLocation StartLoc = Decl.Info->getDefinitionLoc(); hokein wrote: > if this is a complicated macro (like `AST_MATCHER`), do we still

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/XRefs.cpp:567 /// Generate a \p Hover object given the macro \p MacroInf. +static Hover getHoverContents(MacroDecl Decl, ASTContext ) { The comment seems stale. Comment at:

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 176754. malaperle added a comment. Clang-format Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index:

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp