[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

2019-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ee277b86b34: [Support] add vfs support for ExpandResponseFiles (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70769/new/ https://rev

[PATCH] D70857: [llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

2019-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG75656005dbc8: [llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D71063: [clangd] New rendering structs

2019-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Note that I am planning to add more tests, sending out for review to get some initial feedback on the design. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71063/new/ https://reviews.llvm.org/D71063 ___

[PATCH] D71063: [clangd] New rendering structs

2019-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kadircet added a comment. kadircet added a parent revision: D70911: [clangd] Switch Hover.All to struct

[PATCH] D71063: [clangd] New rendering structs

2019-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232332. kadircet added a comment. - Move function definitions to source file, via define out-of-line :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71063/new/ https://reviews.llvm.org/D71063 Files: clang-

[PATCH] D70723: [clangd] Store index::SymbolKind in HoverInfo

2019-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232519. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70723/new/ https://reviews.llvm.org/D70723 Files: clang-tools-ex

[PATCH] D70911: [clangd] Switch Hover.All to structured tests

2019-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc5adbac9b85a: [clangd] Switch Hover.All to structured tests (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D70911?vs=231735&id=232537#toc Repository: rG LLVM Github Monorep

[PATCH] D70723: [clangd] Store index::SymbolKind in HoverInfo

2019-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24439a761c5e: [clangd] Store index::SymbolKind in HoverInfo (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70723/new/ https://reviews

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Only function declarations should have the default arguments. This patch makes sure we don't propogate th

[PATCH] D71188: [clangd] Delete ctor initializers while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Currently we only delete function body from declaration, in addition to that we should also drop ctor initia

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232790. kadircet added a comment. - Add `.` after comment and fix indentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71187/new/ https://reviews.llvm.org/D71187 Files: clang-tools-extra/clangd/refact

[PATCH] D71189: [Parser] Don't crash on MS assembly if target desc/asm parser isn't linked in.

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:1018 + } // namespace nit: empty line Comment at: clang/lib/Parse/ParseStmtAsm.cpp:591 std::unique_ptr MAI( TheTarget->createMCAsmI

[PATCH] D71189: [Parser] Don't crash on MS assembly if target desc/asm parser isn't linked in.

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71189/new/ https://reviews.llvm.org/D71189 __

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232823. kadircet marked 4 inline comments as done. kadircet added a comment. - Make use of token buffer instead of trying to go-over identifier name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71187/new/ ht

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:186 +if (PVD->hasDefaultArg()) { + auto DelRange = CharSourceRange::getTokenRange(PVD->getDefaultArgRange()); + auto StartLoc = PVD->getLocation(); --

[PATCH] D71188: [clangd] Delete ctor initializers while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:269 + } + DeletionRange.setBegin(InitStart); +} hokein wrote: > There is an alternative here, I think.

[PATCH] D71188: [clangd] Delete ctor initializers while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232825. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71188/new/ https://reviews.llvm.org/D71188 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cp

[PATCH] D71188: [clangd] Delete ctor initializers while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232877. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71188/new/ https://reviews.llvm.org/D71188 Files: clang-tools-ex

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232886. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71187/new/ https://reviews.llvm.org/D71187 Files: clang-tools-ex

[PATCH] D71188: [clangd] Delete ctor initializers while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa209a8000e17: [clangd] Delete ctor initializers while moving functions out-of-line (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7118

[PATCH] D71187: [clangd] Delete default arguments while moving functions out-of-line

2019-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG898d7a0695c5: [clangd] Delete default arguments while moving functions out-of-line (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7118

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Initial patch for new rendering structs in clangd. Splitting implementation into smaller chunks, for a full view of the API see D71063

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:699 + [[Foo]](); + ^~[[Foo]](); +}; could you also add a case with `~^Foo()` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233078. kadircet added a comment. - More comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71248/new/ https://reviews.llvm.org/D71248 Files: clang-tools-extra/clangd/FormattedString.cpp clang-tools-e

[PATCH] D68261: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline

2019-12-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233081. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68261/new/ https://reviews.llvm.org/D68261 Files: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp clang-t

[PATCH] D71284: [clangd] Consider () part of the FunctionDecl, not the FunctionTypeLoc

2019-12-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Selection.cpp:578 // Returns the range of tokens that this node will claim directly, and // is not available to the node'

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233420. kadircet marked 12 inline comments as done. kadircet added a comment. - Move code blocks out of Paragraph - Provide a way to control vertical spacing - Address comments around naming Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.cpp:95 +// Concatanates whitespace blocks into a single ` `. +std::string canonicalizeSpaces(std::string Input) { + // Goes over the string and preserves only a single ` ` for any whitespace ---

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233513. kadircet added a comment. - More tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71248/new/ https://reviews.llvm.org/D71248 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extr

[PATCH] D71403: [clangd] Fix hover crashing on null types

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/225 Repository: rG LLVM Github Monorepo https://review

[PATCH] D71403: [clangd] Fix hover crashing on null types

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:251 QualType T = E->getType(); - if (T->isFunctionType() || T->isFunctionPointerType() || + if (T.isNull() || T->isFunctionType() || T->isFunctionPointer

[PATCH] D71403: [clangd] Fix hover crashing on null types

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rG75b04c7af9e7: [clangd] Fix hover crashing on null types (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233566. kadircet marked 4 inline comments as done. kadircet added a comment. - Move separation logic from container to blocks - Add two concrete APIs to block for getting strings and update tests to use those. - Rename methods Repository: rG LLVM Github

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 12 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.cpp:122 +}; +std::string renderBlocks(llvm::ArrayRef> Children, + RenderType RT) { sammccall wrote: > I'm not

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/FormattedStringTests.cpp:79 + { + Test::PlainText, + "after", sammccall wrote: > I'd consider writing this as > `[&] { Para.appendText("after"); }` to make it cl

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233576. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71248/new/ https://reviews.llvm.org/D71248 Files: clang-tools-ex

[PATCH] D71414: [clangd] Introduce codeblocks

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Follow-up to the patch D71248 Repository: rG LLVM Github Monorepo

[PATCH] D71414: [clangd] Introduce codeblocks

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233606. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71414/new/ https://reviews.llvm.org/D71414 Files: clang-tools-ex

[PATCH] D71414: [clangd] Introduce codeblocks

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.cpp:138 +// No need to pad from previous blocks, as they should end with a new line. +OS << renderCodeBlock(Contents, Language) << '\n'; + } sammccall wrote: > can you i

[PATCH] D71422: [clangd] Introduce bulletlists

2019-12-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71422 Files: clang-tools-extra/clan

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG597c6b65552a: [clangd] Introduce paragraph, the first part of new rendering structs (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D712

[PATCH] D71414: [clangd] Introduce codeblocks

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c13fe8a6a64: [clangd] Introduce codeblocks (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71414/new/ https://reviews.llvm.org/D71414

[PATCH] D68261: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1913 + + // Specializations needs to be marked "inline". + ExtraFiles["a.h"] = R"cpp( hokein wrote: > could you add a test case for partial template specializations?

[PATCH] D68261: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG087528a33178: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[PATCH] D68261: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 233751. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68261/new/ https://reviews.llvm.org/D68261 Files: cla

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. tl;dr; LGTM, from my side as long as you are also happy with the extra complexity introduced by this to all call sites. As told in the offline discussions, only problem I have with this ap

[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

2019-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D71345#1783579 , @nridge wrote: > (For completeness, there is a way to target `b` in `a+b+c`: by selecting `b` > (such that your selection range has length 1 rather than 0). Then, neither > `+` node will enclose the selection

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a reviewer: kadircet. kadircet added a comment. I think this requires changes in other places too, for example when querying index for the children we rather want to query using the symbolid of template pattern, not the instantiation. Comment at: clang-tools-ex

[PATCH] D71543: [clangd] Fix handling of inline and anon namespaces in hover

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Clangd normally skips printing of inline and anon namespaces while printing nested name specifiers. There was a bug causing us to print inne

[PATCH] D71544: [clangd] Improve printing of lambda names

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Clangd was printing lambdas as `(anonymous class)` before, we can improve it by at least printing `(lambda)` instea

[PATCH] D71545: [clangd] Improve hover for auto on template instantiations

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. kadircet added a parent revision: D71544: [clangd] Improve printing of lambda names. Follow-up to D71543

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234050. kadircet marked 9 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71543/new/ https://reviews.llvm.org/D71543 Files: clang-tools-ex

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D71543#1785785 , @ilya-biryukov wrote: > My biggest concern is that we seem to make output for template instantiation > worse. > There should be a way to stop showing anonymous namespace without > introducing such regressio

[PATCH] D71422: [clangd] Introduce bulletlists

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.h:95 + /// Causes every line of the document to be indented by 2 spaces. Except the + /// first line, it is containers responsibility to adjust padding for first sammccall wr

[PATCH] D71422: [clangd] Introduce bulletlists

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234059. kadircet marked 2 inline comments as done. kadircet added a comment. - Move indentation logic into bulletlist. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71422/new/ https://reviews.llvm.org/D71422

[PATCH] D71555: [clangd] Refurbish HoverInfo::present

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Improves basic hover presentation logic to include more info. Repository: rG LLVM Github Monorepo

[PATCH] D71555: [clangd] Refurbish HoverInfo::present

2019-12-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234087. kadircet added a comment. - Get rid of irrelevant change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71555/new/ https://reviews.llvm.org/D71555 Files: clang-tools-extra/clangd/Hover.cpp clang-to

[PATCH] D71586: [clangd] Add a test case that verifies -fimplicit-modules work in Clangd when building the AST

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Can we add a unit test instead of(or in addition to) this one? I suppose it should be easy to right one using `TestTU` with `ExtraArgs` and `AdditionalFiles` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71586/new/ https

[PATCH] D71545: [clangd] Improve hover for auto on template instantiations

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:556 +// FIXME: Drop default arguments. +HI.Name = "Foo"; +HI.Kind = index::SymbolKind::Class; -

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234249. kadircet added a comment. - Squash follow-ups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71543/new/ https://reviews.llvm.org/D71543 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/cla

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:353 /// Generate a \p Hover object given the type \p T. HoverInfo getHoverContents(QualType T, const Decl *D, ASTContext &ASTCtx, +

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234250. kadircet added a comment. - Delete fixme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71543/new/ https://reviews.llvm.org/D71543 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/clangd/H

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Clangd didn't fill documentation for `auto` when it wasn't available in index. Also it wasn't showing any documenta

[PATCH] D71597: [clangd][NFC] Make use of TagDecl inside type for hover on auto

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. We were traversing AST twice to get the Decl in case of sugared types(auto, decltype). They seem to be same in prac

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:353 /// Generate a \p Hover object given the type \p T. HoverInfo getHoverContents(QualType T, const Decl *D, ASTContext &ASTCtx, + const SymbolIndex *Index) { -

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234287. kadircet marked 6 inline comments as done. kadircet added a comment. - Address comments - Get rid of deduced decl in decltype/auto case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71543/new/ https://

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234288. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ https://reviews.llvm.org/D71596 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/unitt

[PATCH] D71545: [clangd] Improve hover for auto on template instantiations

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet marked an inline comment as done. kadircet added a comment. integrated into D71543 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71545/new/ https://reviews.llvm.org/D71545

[PATCH] D71544: [clangd] Improve printing of lambda names

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet added a comment. Integrated into D71543 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71544/new/ https://reviews.llvm.org/D71544 ___

[PATCH] D71597: [clangd][NFC] Make use of TagDecl inside type for hover on auto

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234291. kadircet marked an inline comment as done. kadircet added a comment. - Added alias tests, behavior stayed the same. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71597/new/ https://reviews.llvm.org/D71

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234293. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ https://reviews.llvm.org/D71596 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/unitt

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234292. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71543/new/ https://reviews.llvm.org/D71543 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/clangd/Hover.c

[PATCH] D71597: [clangd][NFC] Make use of TagDecl inside type for hover on auto

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3d15605358eb: [clangd][NFC] Make use of TagDecl inside type for hover on auto (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71597/new

[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9ab15f303efd: [clangd] Fix handling of inline/anon namespaces and names of deduced types in… (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:188 +// returns D. +const NamedDecl *getExplicitSpec(const NamedDecl *D) { + if (auto *CTSD = llvm::dyn_cast(D)) { ilya-biryukov wrote: > Wh

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:687 - const Decl *D = Decls[0]; + const Decl *D = nullptr; + for (const Decl *Candidate : Decls) { maybe just ``` const Decl *D = Decls.front() for(const auto *C : Decls) { if(i

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234487. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ https://reviews.llvm.org/D71596 Files: clang-tools-ex

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:188 +// returns D. +const NamedDecl *getExplicitSpec(const NamedDecl *D) { + if (auto *CTSD = llvm::dyn_cast(D)) { ilya-biryukov wrote: > kadircet wrote: > > ilya-biryukov wrote: > >

[PATCH] D71545: [clangd] Improve hover for auto on template instantiations

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:1209 // FIXME: Print template instantiation parameters. -HI.Name = "initializer_list"; +HI.Name = "initial

[PATCH] D71652: [clangd] Replace shortenNamespace with getQualification

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71652 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234514. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments - Extend handling to: - var and function templates - non-auto case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234522. kadircet marked 4 inline comments as done. kadircet added a comment. - Expose explicitReferenceTargets Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ https://reviews.llvm.org/D71596 Files:

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:136 HI.Kind = index::SymbolKind::Class; - HI.Definition = "template class vector {}"; - HI.TemplateParameters = { -

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234541. kadircet marked 2 inline comments as done. kadircet added a comment. - Document limitation on Mask parameter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ https://reviews.llvm.org/D71596 Fi

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:217 +SourceLocation positionToSourceLoc(const SourceManager &SM, Position Pos, + StringRef Filename) { this one isn't used anywhere?

[PATCH] D71652: [clangd] Replace shortenNamespace with getQualification

2019-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 234564. kadircet added a comment. - Use explicitTargetReferences - Added some testing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71652/new/ https://reviews.llvm.org/D71652 Files: clang-tools-extra/clangd

[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

2019-12-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac3f9e484217: [clangd] Improve documentation for auto and implicit specs (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71596/new/ ht

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2019-12-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:687 - const Decl *D = Decls[0]; + const Decl *D = nullptr; + for (const Decl *Candidate : Decls) { kadircet wrote: > maybe just > ``` > const Decl *D = Decls.front() > for(const a

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:431 +// REQUIRES: Indexed and Lexed are sorted. +// REQUIRES: Indexed and Lexed are sorted. +llvm::Optional> filterIndexResults(ArrayRef Indexed, duplication ==

[PATCH] D71248: [clangd] Introduce paragraph, the first part of new rendering structs

2019-12-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.cpp:110 +// Separate from next block. +*WritePtr++ = ' '; + } aganea wrote: > There's an issue at this line, the iterator migh

[PATCH] D71727: [clang][Tooling] Prefer -x over -std when interpolating

2019-12-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, ilya-biryukov. Herald added a project: clang. Currently interpolation logic prefers -std over -x. But the latter is a more strong signal, so this patch inverts the order and only

[PATCH] D71727: [clang][Tooling] Prefer -x over -std when interpolating

2019-12-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc2377eae286b: [clang][Tooling] Prefer -x over -std when interpolating (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71727/new/ https

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks for doing this! Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1378 Scopes.AccessibleScopes = -visibleNamespaces(Content.take_front(Offse

[PATCH] D75687: [clangd] Only minimally escape text when rendering to markdown.

2020-03-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Just writing down my investigation results for context: Looks like we'll never escape `$%'(,/:;?@[^{|}` anymore. Markdown already doesn't provide backslash escaping for `$%',/:;?@^|` which leaves us with parentheses `([{}`: - `[` looks fine as it is only used for hyper

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. sammccall added inline comments. Comment at: clang-tools-extra/clangd/TU

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 249439. kadircet marked 6 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75927/new/ https://reviews.llvm.org/D75927 Files: clang-tools-ex

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp:376 Notification Start; - updateWithDiags(S, Path, "a", WantDiagnostics::Yes, [&](std::vector) { -++Builds; -Start.wait(); - }); + updateWithDiags(S, Path, "b", WantD

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39eebe68b599: [clangd] Use a separate RunningTask flag instead of leaving a broken request on… (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D75995: [clangd] Decouple preamble and mainfile builds, NFCI

2020-03-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. First step to enable deferred preamble builds. Not intending to land it alone, will h

[PATCH] D75996: [clangd] Populate PreambleData::CompileCommand and make use of it inside buildPreamble

2020-03-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. kadircet added a parent revision: D75995: [clangd] Decouple preamble and mainfile builds,

<    27   28   29   30   31   32   33   34   35   36   >