[PATCH] D43303: [Format] Fix for bug 35641

2018-02-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: rsmith, djasper. kadircet added a project: clang. Herald added a subscriber: cfe-commits. Bug was caused due to comments at the start of scope. For a code like: int func() { // int b; int c; } the comment at the first line

[PATCH] D43303: [Format] Fix for bug 35641

2018-02-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 134414. kadircet added a comment. Changed description of unit test to include direct link to bug. Used different variable types to make sure alignment happens. Repository: rC Clang https://reviews.llvm.org/D43303 Files:

[PATCH] D43303: [Format] Fix for bug 35641

2018-02-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Btw, I cannot commit the change myself, don't have commit rights. Repository: rC Clang https://reviews.llvm.org/D43303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43303: [Format] Fix for bug 35641

2018-02-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 134830. kadircet added a comment. Rebased and uploaded diff to the master. Sorry for the inconvenience. Repository: rC Clang https://reviews.llvm.org/D43303 Files: lib/Format/WhitespaceManager.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, ioeric. Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50193

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 159000. kadircet marked 8 inline comments as done. kadircet added a comment. Fixed discussions https://reviews.llvm.org/D50193 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Diagnostics.cpp clangd/Protocol.h clangd/SourceCode.cpp

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay, ioeric, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp

[PATCH] D50449: [clangd] Support textEdit in addition to insertText.

2018-08-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Completion replies contains textEdits as well. Note that this change relies on https://reviews.llvm.org/D50443. Repository: rCTE Clang Tools

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339224: Added functionality to suggest FixIts for conversion of - to . and vice… (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D50193?vs=159648=159655#toc

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 159648. kadircet marked 3 inline comments as done. kadircet added a comment. - Resolve some more discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50193 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160986. kadircet added a comment. - Made TaskHandle move-only. Since it is costly and most likely unnecessary to copy it other than to move it into Context. - Provided an explicit clone method for copying. Repository: rCTE Clang Tools Extra

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ioeric, ilya-biryukov, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Currently we only add parantheses to the functions if snippets are enabled, which also inserts snippets for parameters into parantheses.

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160636. kadircet marked 4 inline comments as done. kadircet added a comment. - Get rid of getCancellationError. - Add replyError helper. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Cancellation.cpp:17 +namespace { +static Key>> CancellationTokenKey; +} // namespace ilya-biryukov wrote: > Having a `shared_ptr` key in the Context can cause data races (e.g. if we > copy it concurrently from

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160652. kadircet marked 8 inline comments as done. kadircet added a comment. - Resolve discussions. - Get rid of CancellationHandler class. - Change error class name. - Improve documentation. Repository: rCTE Clang Tools Extra

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160531. kadircet marked 7 inline comments as done. kadircet added a comment. - Polished API. - Resolved discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Cancellation.h:71 + +class TaskHandle { +public: ilya-biryukov wrote: > I wonder if we should make `TaskHandle` move-only? > > The reasoning is that is can be easily used from multiple threads (since it's >

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.h:85 + + /// Enables cursor to be moved around according to completions needs even when + /// snippets are disabled. For example selecting a function with parameters as ioeric wrote: > IIRC, the

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161018. kadircet marked 21 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp clangd/Cancellation.h

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Cancellation.h:92 + operator bool() const { return isCancelled(); } + friend CancellationToken isCancelled(); + ilya-biryukov wrote: > It's a bit confusing that this name clashes with a member function. > We

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161023. kadircet marked an inline comment as done. kadircet added a comment. - Change option name. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 159261. kadircet marked 4 inline comments as done. kadircet added a comment. Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa. - Fixes for comments. - Take unnecessary patches back - Second pass for comments. - Add

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 159510. kadircet marked 6 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50193 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Diagnostics.cpp

[PATCH] D50443: [clang] Store code completion token range in preprocessor.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160299. kadircet added a comment. - Resolve discussions. - Fix typo. Repository: rC Clang https://reviews.llvm.org/D50443 Files: include/clang/Lex/Preprocessor.h lib/Lex/Preprocessor.cpp Index: lib/Lex/Preprocessor.cpp

[PATCH] D50443: [clang] Store code completion token range in preprocessor.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339540: [clang] Store code completion token range in preprocessor. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50443

[PATCH] D50555: [clangd] Introduce scoring mechanism for SignatureInformations.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160306. kadircet marked 2 inline comments as done. kadircet added a comment. - Rebase & Resolve discussions. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50555 Files: clangd/CodeComplete.cpp clangd/Quality.cpp

[PATCH] D50449: [clangd] Support textEdit in addition to insertText.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339543: [clangd] Support textEdit in addition to insertText. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50449 Files:

[PATCH] D50555: [clangd] Introduce scoring mechanism for SignatureInformations.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339547: [clangd] Introduce scoring mechanism for SignatureInformations. (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D50555?vs=160306=160307#toc

[PATCH] D50449: [clangd] Support textEdit in addition to insertText.

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160303. kadircet added a comment. - Rebase. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50449 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/SourceCode.cpp clangd/SourceCode.h

[PATCH] D50635: Fix lint tests for D50449

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, ioeric. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50635 Files: test/clangd/completion-snippets.test test/clangd/completion.test Index:

[PATCH] D50635: Fix lint tests for D50449

2018-08-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339572: Fix lint tests for D50449 (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50635 Files:

[PATCH] D50449: [clangd] Support textEdit in addition to insertText.

2018-08-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160073. kadircet marked 5 inline comments as done. kadircet added a comment. Herald added a subscriber: mgrang. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50449 Files: clangd/CodeComplete.cpp

[PATCH] D50555: [clangd] Introduce scoring mechanism for SignatureInformations.

2018-08-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50555 Files: clangd/CodeComplete.cpp clangd/Quality.cpp clangd/Quality.h

[PATCH] D50449: [clangd] Support textEdit in addition to insertText.

2018-08-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1310 + // other. + for (const auto : FixIts) { +if (IsRangeConsecutive(FixIt.range, LSP.textEdit->range)) { ilya-biryukov wrote: > Maybe keep the `reserve` call? (we could reserve one

[PATCH] D50555: [clangd] Introduce scoring mechanism for SignatureInformations.

2018-08-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160097. kadircet marked 3 inline comments as done. kadircet added a comment. Herald added a subscriber: mgrang. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50555 Files: clangd/CodeComplete.cpp

[PATCH] D50443: [clang] Store code completion token range in preprocessor.This change is to support a new fature in clangd, tests will be send toclang-tools-extra with that change.

2018-08-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Repository: rC Clang https://reviews.llvm.org/D50443 Files: include/clang/Lex/Preprocessor.h lib/Lex/Preprocessor.cpp Index:

[PATCH] D50443: [clang] Store code completion token range in preprocessor.

2018-08-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 159703. kadircet marked an inline comment as done. kadircet added a comment. - Resolve discussions. Repository: rC Clang https://reviews.llvm.org/D50443 Files: include/clang/Lex/Preprocessor.h lib/Lex/Preprocessor.cpp Index:

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:621 + std::lock_guard Lock(TaskHandlesMutex); + const auto = TaskHandles.find(Params.ID); + if (it != TaskHandles.end()) { ilya-biryukov wrote:

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161261. kadircet marked 10 inline comments as done. kadircet added a comment. - Resolve discussions & Delete enclosing quotes when normalizing. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt

[PATCH] D50898: Suggest code-completions for overriding base class virtual methods.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, hokein, ioeric. Herald added subscribers: cfe-commits, arphaman, jkorous. Whenever a code-completion is triggered within a class/struct/union looks at base classes and figures out non-overriden virtual functions. Than

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1381 + // Check whether function has any parameters or not. + LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()"; +} ioeric wrote: > I think we are missing one

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161265. kadircet marked 3 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161243. kadircet added a comment. - Change option name. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h unittests/clangd/CodeCompleteTests.cpp Index:

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1377 + // Check whether function has any parameters or not. + LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()"; +else

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161256. kadircet added a comment. - Only append to snippets of type function or method. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h unittests/clangd/CodeCompleteTests.cpp

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340040: [clangd] Add parantheses while auto-completing functions. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:1710 + $bol^ + ab$ab^ + x.ab$dot^ Maybe an EXPECT for this one as well? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50962

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161683. kadircet marked 3 inline comments as done. kadircet added a comment. - Put overrides through scoring and resolve nits. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50898 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1233 +// struct/class/union definition. +const auto Overrides = getVirtualNonOverridenMethods( +Recorder->CCSema->CurContext, Recorder->CCSema);

[PATCH] D51039: [clangd] Add unittests for D51038

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, ioeric, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51039 Files: unittests/clangd/CodeCompleteTests.cpp Index:

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. After today's offline discussion I suppose we are not going to implement it within Sema. And also I think getVirtualNonOverridenMethods is a pretty generic function that has no ties to clangd, so it can be easily moved into Sema. Should we still move it into a

[PATCH] D51163: [clangd] Check for include overlapping looks for only the line now.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, hokein, ioeric. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Currently we match an include only if we are inside filename, with this patch we will match whenever we are on the starting line of the

[PATCH] D51163: [clangd] Check for include overlapping looks for only the line now.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340539: [clangd] Check for include overlapping looks for only the line now. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Protocol.h:883 +/// converts it into a string. +bool parseNumberOrString(const llvm::json::Value , std::string , + const std::string ); ilya-biryukov wrote: > Maybe simplify the signature

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 162354. kadircet marked 2 inline comments as done. kadircet added a comment. - Change helper for normalizing Number | String. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 162342. kadircet marked 3 inline comments as done. kadircet added a comment. - Change a few comments. - Add some assertions. - Fix a data race. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:351 + [this](llvm::Expected List) { +auto _ = llvm::make_scope_exit([this]() { CleanupTaskHandle(); }); + ilya-biryukov wrote: >

[PATCH] D51214: [clangd] Add options to enable/disable fixits and function argument snippets.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: hokein, ioeric, ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Currently LSP clients cannot directly change IncludeFixIts or EnableFunctionArgSnippets parameters. This patch is to provide them with a way

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340607: [clangd] Initial cancellation mechanism for LSP requests. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 162365. kadircet marked 2 inline comments as done. kadircet added a comment. - Resolve comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp clangd/Cancellation.h

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ProtocolHandlers.cpp:70 Register("textDocument/hover", ::onHover); + Register("textDocument/typeHierarchy", ::onTypeHierarchy); Register("textDocument/documentSymbol", ::onDocumentSymbol); LSP doesn't

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161428. kadircet marked 2 inline comments as done. kadircet added a comment. - Check cancellation earlier && Fix normalization difference between string and integer request ids. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files:

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:75 +std::string NormalizeRequestID(const json::Value ) { + CancelParams CP; + fromJSON(json::Object{{"id", ID}}, CP); ioeric wrote: > Use `ID.getAsString()`? Unfortunately id can be both a

[PATCH] D51311: (WIP) Type hierarchy

2018-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Protocol.h:889 + // Does this node implement the method targeted by the request? + bool DeclaresMethod; + I think comment and the name is in contradiction here, do you mean DefinesMethod?

[PATCH] D51102: [clangd] Move function argument snippet disable mechanism from LSP rendering to internal clangd reprensentation.

2018-08-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, ioeric, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. We were handling the EnableFunctionArgSnippets only when we are producing LSP response. Move that code into CompletionItem generation so that

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161908. kadircet marked 6 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp clangd/Cancellation.h

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-08-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161966. kadircet marked 2 inline comments as done. kadircet added a comment. - Resolve discussions. - Add tests. - Fix a bug noticed by lit tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161963. kadircet marked 6 inline comments as done. kadircet added a comment. - Resolve discussions. - Fix a bug inside summarizeOverride. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50898 Files: clangd/CodeComplete.cpp

[PATCH] D51102: [clangd] Move function argument snippet disable mechanism from LSP rendering to internal clangd reprensentation.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340527: [clangd] Move function argument snippet disable mechanism from LSP rendering to… (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 162151. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50898 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h unittests/clangd/CodeCompleteTests.cpp Index:

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 162157. kadircet added a comment. - Resolve discussions. - Move override generation logic from render to item generation so that internal clients can use it as well, also use a boolean for checking override status of a bundle to be more efficient. - Change

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE340530: [clangd] Suggest code-completions for overriding base class virtual methods. (authored by kadircet, committed by ). Changed prior to commit:

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161716. kadircet marked 4 inline comments as done. kadircet added a comment. - Get rid of CancellationToken && Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt

[PATCH] D51038: [clangd] Make sure codecompletion is called for calls even when inside a token.

2018-08-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, ioeric, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Currently CodeCompleteCall only gets called after a comma or parantheses. This patch makes sure it is called even at the cases like:

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:184 + size_t Bytes = PairedSlabSize; + Bytes += LookupTable.size() * sizeof(std::pair); Bytes += SymbolQuality.size() * sizeof(std::pair); Why not use

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:91 + for (const auto : FileToSlabs) +Result += P.second->size(); + return Result; Why not `bytes` here as well? https://reviews.llvm.org/D51539

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163971. kadircet added a comment. - Update comments. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163970. kadircet added a comment. - Update tests. - Update comment. - Rebase. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp

[PATCH] D51724: [clangd] Add "Deprecated" field to Symbol and CodeCompletion.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Index.h:171 + /// See also isIndexedForCodeCompletion(). + IsIndexedForCodeCompletion = 1 << 0, + /// Indicates if the symbol is deprecated. nit: rename to IndexedForCodeCompletion, since it is more of

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164477. kadircet added a comment. - Rebase and use new signature help. Currently the problem is, there are again some tests out there that rely on CodeCompeleteOrdinaryName to be called even when getting overloads at an unknown parameter type. These tests

[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ioeric, sammccall, ilya-biryukov, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Adds deprecation warnings to diagnostics. Also lowers the severity from warning to notes to not to annoy people that work on big

[PATCH] D51724: [clangd] Add "Deprecated" field to Symbol and CodeCompletion.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/SymbolCollectorTests.cpp:1020 + const std::string Header = R"( +void TestClangc() __attribute__((deprecated("", ""))); +void TestClangd(); No need for the optional parameters, ``` void

[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164268. kadircet added a comment. - Formatting. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51747 Files: clangd/ClangdServer.cpp clangd/Diagnostics.cpp unittests/clangd/ClangdUnitTests.cpp Index:

[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Diagnostics.cpp:299 +D.Severity = +D.Category == "Deprecations" ? DiagnosticsEngine::Note : DiagLevel; return D; Couldn't find a better way to check for this one. Category types are coming from

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35)

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164307. kadircet added a comment. - Fix tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164659. kadircet added a comment. - Inline completers. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Parse/ParseExprCXX.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164649. kadircet marked 2 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In https://reviews.llvm.org/D51038#1228618, @ilya-biryukov wrote: > > Currently the problem is, there are again some tests out there that rely on > > CodeCompeleteOrdinaryName to be called even when getting overloads at an > > unknown > > parameter type > >

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164639. kadircet marked an inline comment as done. kadircet added a comment. - Change "inside parameter" checking and fix completion string printing for optional parameters. - Update tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files:

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164661. kadircet marked an inline comment as done. kadircet added a comment. - One last completer Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341824: [clang] Make sure codecompletion is called for calls even when inside a token. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D51039: [clangd] Add unittests for D51038

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341830: [clangd] Add unittests for D51038 (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51039?vs=163968=164668#toc

[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

2018-09-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In https://reviews.llvm.org/D51747#1227089, @ilya-biryukov wrote: > Not sure if it's fine to hijack our own diagnostic-specific flags in to clang > command args. > > Cons that I see: > > 1. There is no way for the users to turn them off if they find them > non-useful.

[PATCH] D51039: [clangd] Add unittests for D51038

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163968. kadircet added a comment. Rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51039 Files: unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.cpp

[PATCH] D51917: [CodeCompletion] Enable signature help when initializing class/struct/union members.

2018-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov, ioeric. Herald added a subscriber: cfe-commits. Factors out member decleration gathering and uses it in parsing to call signature help. Doesn't support signature help for base class constructors, the code was

[PATCH] D51297: [docs] Create a guide for Vim users on how to set up Clangd

2018-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In https://reviews.llvm.org/D51297#1228725, @ioeric wrote: > I also support having some instructions/pointers on editor integration. That > said, I think we should have a section "Editor integration" with a list of > editor clients that are known to work with clangd,

[PATCH] D51214: [clangd] Add options to enable/disable fixits and function argument snippets.

2018-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164830. kadircet marked 5 inline comments as done. kadircet added a comment. - Change flag's name and rebase. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51214 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp

[PATCH] D51917: [CodeCompletion] Enable signature help when initializing class/struct/union members.

2018-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164844. kadircet marked 3 inline comments as done. kadircet added a comment. - Move ValueDecl extraction to a helper. - Call completion handlers as well. Repository: rC Clang https://reviews.llvm.org/D51917 Files: include/clang/Sema/Sema.h

  1   2   3   4   5   6   7   >