[clang-tools-extra] r334032 - [clangd] Quality fixes (uninit var, missing debug output, pattern decl CCRs).

2018-06-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jun 5 10:58:12 2018 New Revision: 334032 URL: http://llvm.org/viewvc/llvm-project?rev=334032&view=rev Log: [clangd] Quality fixes (uninit var, missing debug output, pattern decl CCRs). Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-ext

[clang-tools-extra] r334033 - [clangd] Fix inverted test again, sigh

2018-06-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jun 5 11:00:48 2018 New Revision: 334033 URL: http://llvm.org/viewvc/llvm-project?rev=334033&view=rev Log: [clangd] Fix inverted test again, sigh Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-extra/trunk/clangd/Quality.cpp URL: http:

[clang-tools-extra] r334074 - Adjust symbol score based on crude symbol type.

2018-06-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 6 01:53:36 2018 New Revision: 334074 URL: http://llvm.org/viewvc/llvm-project?rev=334074&view=rev Log: Adjust symbol score based on crude symbol type. Summary: Numbers are guesses to be adjusted later. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkoro

[clang-tools-extra] r334089 - [clangd] Boost fuzzy match score by 2x (so a maximum of 2) when the query is the full identifier name.

2018-06-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 6 05:38:37 2018 New Revision: 334089 URL: http://llvm.org/viewvc/llvm-project?rev=334089&view=rev Log: [clangd] Boost fuzzy match score by 2x (so a maximum of 2) when the query is the full identifier name. Summary: Fix a couple of bugs in tests an in Quality to k

[clang-tools-extra] r334162 - [clangd] Make workspace/symbols actually rank its results.

2018-06-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 6 23:55:59 2018 New Revision: 334162 URL: http://llvm.org/viewvc/llvm-project?rev=334162&view=rev Log: [clangd] Make workspace/symbols actually rank its results. Summary: The index doesn't actually return results in ranked order. Reviewers: hokein Subscribers: i

[clang-tools-extra] r334170 - [clangd] fix unintended fallthrough in scope-based scoring

2018-06-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 7 01:16:36 2018 New Revision: 334170 URL: http://llvm.org/viewvc/llvm-project?rev=334170&view=rev Log: [clangd] fix unintended fallthrough in scope-based scoring Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-extra/trunk/clangd/Qua

[clang-tools-extra] r334192 - [clangd] Code completion: drop explicit injected names/operators, ignore Sema priority

2018-06-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 7 05:49:17 2018 New Revision: 334192 URL: http://llvm.org/viewvc/llvm-project?rev=334192&view=rev Log: [clangd] Code completion: drop explicit injected names/operators, ignore Sema priority Summary: Now we have most of Sema's code completion signals incorporated

[clang-tools-extra] r334274 - [clangd] Downrank symbols with reserved names (score *= 0.1)

2018-06-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 8 02:36:34 2018 New Revision: 334274 URL: http://llvm.org/viewvc/llvm-project?rev=334274&view=rev Log: [clangd] Downrank symbols with reserved names (score *= 0.1) Reviewers: ilya-biryukov Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits Differential R

[clang-tools-extra] r334287 - [clangd] Require case-insensitive prefix match for macro completions.

2018-06-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 8 06:32:25 2018 New Revision: 334287 URL: http://llvm.org/viewvc/llvm-project?rev=334287&view=rev Log: [clangd] Require case-insensitive prefix match for macro completions. Summary: Macros are terribly spammy at the moment and this offers some relief. Reviewers:

[clang-tools-extra] r334315 - [clangd] Fix fuzzer after r333993

2018-06-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 8 13:25:05 2018 New Revision: 334315 URL: http://llvm.org/viewvc/llvm-project?rev=334315&view=rev Log: [clangd] Fix fuzzer after r333993 Modified: clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp Modified: clang-tools-extra/trunk/clangd/fuzzer/ClangdFuz

Re: [clang-tools-extra] r333993 - [clangd] Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-08 Thread Sam McCall via cfe-commits
extra/clangd/fuzzer/../ClangdLSPServer.h:46:23: > note: passing argument to parameter 'In' here > Step #4: bool run(std::FILE *In, > Step #4: ^ > Step #4: 1 error generated. > Step #4: ninja: build stopped: subcommand failed. > > > >

[clang-tools-extra] r334323 - [clangd] Deduplicate CompletionItemKind conversion.

2018-06-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 8 14:17:19 2018 New Revision: 334323 URL: http://llvm.org/viewvc/llvm-project?rev=334323&view=rev Log: [clangd] Deduplicate CompletionItemKind conversion. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/clangd/CodeC

[clang-tools-extra] r334572 - [clangd] Log completion context type. NFC

2018-06-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jun 12 23:25:36 2018 New Revision: 334572 URL: http://llvm.org/viewvc/llvm-project?rev=334572&view=rev Log: [clangd] Log completion context type. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/clangd/CodeComplete.cp

[clang-tools-extra] r334589 - Revert "[clangd] Log completion context type. NFC"

2018-06-13 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 13 04:31:20 2018 New Revision: 334589 URL: http://llvm.org/viewvc/llvm-project?rev=334589&view=rev Log: Revert "[clangd] Log completion context type. NFC" This reverts commit r334572, which has a potential use-after-free. Modified: clang-tools-extra/trunk/clan

[clang-tools-extra] r334711 - [clangd] Boost keyword completions.

2018-06-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 14 06:42:21 2018 New Revision: 334711 URL: http://llvm.org/viewvc/llvm-project?rev=334711&view=rev Log: [clangd] Boost keyword completions. Summary: These have few signals other than being keywords, so the boost is high. Reviewers: ilya-biryukov Subscribers: ioer

[clang-tools-extra] r334712 - [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther"

2018-06-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 14 06:50:30 2018 New Revision: 334712 URL: http://llvm.org/viewvc/llvm-project?rev=334712&view=rev Log: [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther" Summary: This is a small code change but vastly reduces noise in code completion r

[clang-tools-extra] r334822 - [clangd] Add option to fold overloads into a single completion item.

2018-06-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 15 04:06:29 2018 New Revision: 334822 URL: http://llvm.org/viewvc/llvm-project?rev=334822&view=rev Log: [clangd] Add option to fold overloads into a single completion item. Summary: Adds a CodeCompleteOption to folds together compatible function/method overloads in

[clang-tools-extra] r334824 - [clangd] context key constructor is constexpr. NFC

2018-06-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 15 05:39:21 2018 New Revision: 334824 URL: http://llvm.org/viewvc/llvm-project?rev=334824&view=rev Log: [clangd] context key constructor is constexpr. NFC Modified: clang-tools-extra/trunk/clangd/Context.h Modified: clang-tools-extra/trunk/clangd/Context.h URL

[clang-tools-extra] r335321 - [clangd] Remove FilterText from the index.

2018-06-21 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 21 23:41:43 2018 New Revision: 335321 URL: http://llvm.org/viewvc/llvm-project?rev=335321&view=rev Log: [clangd] Remove FilterText from the index. Summary: It's almost always identical to Name, and in fact we never used it (we used name instead). The only case wher

[clang-tools-extra] r335360 - [clangd] More precise representation of symbol names/labels in the index.

2018-06-22 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jun 22 09:11:35 2018 New Revision: 335360 URL: http://llvm.org/viewvc/llvm-project?rev=335360&view=rev Log: [clangd] More precise representation of symbol names/labels in the index. Summary: Previously, the strings matched LSP completion pretty closely. The completion

[clang-tools-extra] r344118 - [clangd] Make FSProvider const-correct. NFC

2018-10-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 10 00:46:15 2018 New Revision: 344118 URL: http://llvm.org/viewvc/llvm-project?rev=344118&view=rev Log: [clangd] Make FSProvider const-correct. NFC Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/ClangdServer.h c

r344133 - [CodeComplete] Fix crash when completing params function declarations.

2018-10-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 10 03:51:48 2018 New Revision: 344133 URL: http://llvm.org/viewvc/llvm-project?rev=344133&view=rev Log: [CodeComplete] Fix crash when completing params function declarations. Summary: In a decl like `int AA(BB cc)` where BB isn't defined, we end up trying to parse

[clang-tools-extra] r344245 - [clangd] Remove no-op crash handler, we never set a crash context.

2018-10-11 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 11 06:06:10 2018 New Revision: 344245 URL: http://llvm.org/viewvc/llvm-project?rev=344245&view=rev Log: [clangd] Remove no-op crash handler, we never set a crash context. Summary: I think this was just copied from somewhere with the belief that it actually did some

r344247 - [Tooling] Move CompilationDatabasePlugin to the Registry header, where it's useful. NFC

2018-10-11 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 11 06:42:53 2018 New Revision: 344247 URL: http://llvm.org/viewvc/llvm-project?rev=344247&view=rev Log: [Tooling] Move CompilationDatabasePlugin to the Registry header, where it's useful. NFC Modified: cfe/trunk/include/clang/Tooling/CompilationDatabase.h

Re: [PATCH] D51729: [Tooling] JSONCompilationDatabasePlugin infers compile commands for missing files

2018-10-11 Thread Sam McCall via cfe-commits
Sorry about that. I wasn't familiar with the python bindings. Your bisect is correct, we changed the behavior that test is testing: now an approximate match will be returned. I guess either: - just remove that test (depending on how we feel about smoke-testing vs exhaustively testing wrapperl lik

r344337 - Remove top-level using declaration from header files, as these aliases leak.

2018-10-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 12 05:21:29 2018 New Revision: 344337 URL: http://llvm.org/viewvc/llvm-project?rev=344337&view=rev Log: Remove top-level using declaration from header files, as these aliases leak. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision:

[clang-tools-extra] r344363 - [clangd] Return Command objects from onCodeAction, rather than ad-hoc JSON. NFC

2018-10-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 12 09:51:48 2018 New Revision: 344363 URL: http://llvm.org/viewvc/llvm-project?rev=344363&view=rev Log: [clangd] Return Command objects from onCodeAction, rather than ad-hoc JSON. NFC Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clang-tools-

[clang-tools-extra] r344513 - [clangd] Minimal implementation of automatic static index (not enabled).

2018-10-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 15 06:34:10 2018 New Revision: 344513 URL: http://llvm.org/viewvc/llvm-project?rev=344513&view=rev Log: [clangd] Minimal implementation of automatic static index (not enabled). Summary: See tinyurl.com/clangd-automatic-index for design and goals. Lots of limitatio

[clang-tools-extra] r344520 - [clangd] Use SyncAPI in more places in tests. NFC

2018-10-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 15 08:04:03 2018 New Revision: 344520 URL: http://llvm.org/viewvc/llvm-project?rev=344520&view=rev Log: [clangd] Use SyncAPI in more places in tests. NFC Modified: clang-tools-extra/trunk/clangd/index/Index.h clang-tools-extra/trunk/unittests/clangd/FileInd

[clang-tools-extra] r344533 - [clangd] Revert include path change in Dexp. NFC

2018-10-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 15 09:47:45 2018 New Revision: 344533 URL: http://llvm.org/viewvc/llvm-project?rev=344533&view=rev Log: [clangd] Revert include path change in Dexp. NFC Modified: clang-tools-extra/trunk/clangd/index/dex/dexp/CMakeLists.txt clang-tools-extra/trunk/clangd/in

[clang-tools-extra] r344586 - [clangd] Disable timeouting test while investigating

2018-10-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 15 23:32:14 2018 New Revision: 344586 URL: http://llvm.org/viewvc/llvm-project?rev=344586&view=rev Log: [clangd] Disable timeouting test while investigating Modified: clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp Modified: clang-tools-extra

[clang-tools-extra] r344594 - [clangd] Optionally use dex for the preamble parts of the dynamic index.

2018-10-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 16 01:53:52 2018 New Revision: 344594 URL: http://llvm.org/viewvc/llvm-project?rev=344594&view=rev Log: [clangd] Optionally use dex for the preamble parts of the dynamic index. Summary: Reuse the old -use-dex-index experiment flag for this. To avoid breaking the t

[clang-tools-extra] r344595 - [clangd] Fix threading bugs in (not-yet-used) BackgroundIndex, re-enable test.

2018-10-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 16 02:05:13 2018 New Revision: 344595 URL: http://llvm.org/viewvc/llvm-project?rev=344595&view=rev Log: [clangd] Fix threading bugs in (not-yet-used) BackgroundIndex, re-enable test. Summary: One relatively boring bug: forgot to notify the CV after enqueue. One mu

Re: [clang-tools-extra] r344513 - [clangd] Minimal implementation of automatic static index (not enabled).

2018-10-16 Thread Sam McCall via cfe-commits
psedTime=1446.10 > > Can you take a look? > > Douglas Yung > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > > Of Sam McCall via cfe-commits > > Sent: Monday, October 15, 2018 6:34 > > To: cfe-

[clang-tools-extra] r344617 - [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)

2018-10-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 16 09:29:41 2018 New Revision: 344617 URL: http://llvm.org/viewvc/llvm-project?rev=344617&view=rev Log: [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8) Summary: I don't bother mirroring the full capabilities struct, just parse the bits we ca

[clang-tools-extra] r344620 - [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction.

2018-10-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 16 09:48:06 2018 New Revision: 344620 URL: http://llvm.org/viewvc/llvm-project?rev=344620&view=rev Log: [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction. Summary: This paves the way for alternative transports (mac XPC, maybe messagepack?), a

[clang-tools-extra] r344672 - [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction. (re-land r344620)

2018-10-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 17 00:32:05 2018 New Revision: 344672 URL: http://llvm.org/viewvc/llvm-project?rev=344672&view=rev Log: [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction. (re-land r344620) Summary: This paves the way for alternative transports (mac XPC, may

[clang-tools-extra] r344673 - [clangd] Simplify client capabilities parsing.

2018-10-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 17 00:33:42 2018 New Revision: 344673 URL: http://llvm.org/viewvc/llvm-project?rev=344673&view=rev Log: [clangd] Simplify client capabilities parsing. Summary: Instead of parsing into structs that mirror LSP, simply parse into a flat struct that contains the info w

[clang-tools-extra] r344675 - [clangd] Rename and move trivial logger to Logger.cpp. NFC

2018-10-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 17 00:39:32 2018 New Revision: 344675 URL: http://llvm.org/viewvc/llvm-project?rev=344675&view=rev Log: [clangd] Rename and move trivial logger to Logger.cpp. NFC Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.h clang-tools-extra/trunk/clangd/JSON

[clang-tools-extra] r344676 - [clangd] Hide unused function. NFC

2018-10-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 17 00:41:53 2018 New Revision: 344676 URL: http://llvm.org/viewvc/llvm-project?rev=344676&view=rev Log: [clangd] Hide unused function. NFC Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h Mod

[clang-tools-extra] r344737 - [clangd] Lay JSONRPCDispatcher to rest.

2018-10-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 18 05:32:04 2018 New Revision: 344737 URL: http://llvm.org/viewvc/llvm-project?rev=344737&view=rev Log: [clangd] Lay JSONRPCDispatcher to rest. Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher, ProtocolCallb

[clang-tools-extra] r344741 - [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.

2018-10-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 18 07:41:50 2018 New Revision: 344741 URL: http://llvm.org/viewvc/llvm-project?rev=344741&view=rev Log: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily. Summary: LSP is a slightly awkward map to C++ object lifetimes: the initiali

[clang-tools-extra] r344787 - [clangd] Set workspace root when initializing ClangdServer, disallow mutation.

2018-10-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 19 08:42:23 2018 New Revision: 344787 URL: http://llvm.org/viewvc/llvm-project?rev=344787&view=rev Log: [clangd] Set workspace root when initializing ClangdServer, disallow mutation. Summary: Rename instance variable to WorkspaceRoot to match what we call it intern

[clang-tools-extra] r344858 - [clangd] Fix unqualified make_unique after r344850. NFC

2018-10-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Sat Oct 20 10:40:12 2018 New Revision: 344858 URL: http://llvm.org/viewvc/llvm-project?rev=344858&view=rev Log: [clangd] Fix unqualified make_unique after r344850. NFC Modified: clang-tools-extra/trunk/clangd/index/dex/Dex.cpp Modified: clang-tools-extra/trunk/clangd/

[clang-tools-extra] r345020 - Fix range length comparison in DraftStore::UpdateDraft when Unicode characters are removed from the document

2018-10-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 23 04:51:53 2018 New Revision: 345020 URL: http://llvm.org/viewvc/llvm-project?rev=345020&view=rev Log: Fix range length comparison in DraftStore::UpdateDraft when Unicode characters are removed from the document Summary: See http://lists.llvm.org/pipermail/clangd

[clang-tools-extra] r345022 - [clangd] Support passing a relative path to -compile-commands-dir

2018-10-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 23 04:54:36 2018 New Revision: 345022 URL: http://llvm.org/viewvc/llvm-project?rev=345022&view=rev Log: [clangd] Support passing a relative path to -compile-commands-dir Summary: This is useful when using clangd with CMake based projects in Visual Studio Code sinc

[clang-tools-extra] r345024 - [clangd] Remove caching of compilation database commands.

2018-10-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 23 06:14:02 2018 New Revision: 345024 URL: http://llvm.org/viewvc/llvm-project?rev=345024&view=rev Log: [clangd] Remove caching of compilation database commands. Summary: The CDB implementations used in open-source code are fast, and our private slow CDB will soon

[clang-tools-extra] r345031 - [clangd] Lazily create CDB, remove setCompileCommandsDir.

2018-10-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 23 07:19:54 2018 New Revision: 345031 URL: http://llvm.org/viewvc/llvm-project?rev=345031&view=rev Log: [clangd] Lazily create CDB, remove setCompileCommandsDir. Summary: The only way to actually set the directory is at initialize time, so now CDB is lazy we can pa

[clang-tools-extra] r345113 - [clangd] Truncate SymbolID to 16 bytes.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 23 23:58:42 2018 New Revision: 345113 URL: http://llvm.org/viewvc/llvm-project?rev=345113&view=rev Log: [clangd] Truncate SymbolID to 16 bytes. Summary: The goal is 8 bytes, which has a nonzero risk of collisions with huge indexes. This patch should shake out any i

[clang-tools-extra] r345119 - [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up serialization.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 00:59:38 2018 New Revision: 345119 URL: http://llvm.org/viewvc/llvm-project?rev=345119&view=rev Log: [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up serialization. Summary: CodeAction provides us with a standard way of representing fixes i

[clang-tools-extra] r345141 - [clangd] Don't show base class versions of members as completions.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 06:51:44 2018 New Revision: 345141 URL: http://llvm.org/viewvc/llvm-project?rev=345141&view=rev Log: [clangd] Don't show base class versions of members as completions. Summary: These are available via qualifiers, but signal to noise level is low. Keep required q

[clang-tools-extra] r345144 - [clangd] Ensure that we reply to each call exactly once. NFC (I think!)

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 07:26:26 2018 New Revision: 345144 URL: http://llvm.org/viewvc/llvm-project?rev=345144&view=rev Log: [clangd] Ensure that we reply to each call exactly once. NFC (I think!) Summary: In debug builds, getting this wrong will trigger asserts. In production builds,

[clang-tools-extra] r345150 - [clangd] When replying, log the method name and latency.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 08:18:40 2018 New Revision: 345150 URL: http://llvm.org/viewvc/llvm-project?rev=345150&view=rev Log: [clangd] When replying, log the method name and latency. Summary: This information is strictly available in the log (you can find the original call) but it makes

[clang-tools-extra] r345231 - [clangd] Don't invalidate LSP-set compile commands when closing a file.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 19:04:30 2018 New Revision: 345231 URL: http://llvm.org/viewvc/llvm-project?rev=345231&view=rev Log: [clangd] Don't invalidate LSP-set compile commands when closing a file. Summary: It doesn't make much sense: setting them is not coupled to opening the file, it'

[clang-tools-extra] r345232 - [clangd] Fix -compile-commands-dir flag, broken in r345031

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 19:22:53 2018 New Revision: 345232 URL: http://llvm.org/viewvc/llvm-project?rev=345232&view=rev Log: [clangd] Fix -compile-commands-dir flag, broken in r345031 Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clang-tools-extra/trunk/clangd/Cl

[clang-tools-extra] r345233 - [clangd] Remove unused CDB function. NFC

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 19:25:44 2018 New Revision: 345233 URL: http://llvm.org/viewvc/llvm-project?rev=345233&view=rev Log: [clangd] Remove unused CDB function. NFC Modified: clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp clang-tools-extra/trunk/clangd/GlobalComp

[clang-tools-extra] r345235 - [clangd] Clean up LSP structs around configuration. NFC, no protocol changes.

2018-10-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 24 21:22:52 2018 New Revision: 345235 URL: http://llvm.org/viewvc/llvm-project?rev=345235&view=rev Log: [clangd] Clean up LSP structs around configuration. NFC, no protocol changes. - align struct names/comments with LSP, remove redundant "clangd" prefixes. - don

[clang-tools-extra] r345268 - [clangd] workspace/symbol should be async, it reads from the index.

2018-10-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 25 07:19:14 2018 New Revision: 345268 URL: http://llvm.org/viewvc/llvm-project?rev=345268&view=rev Log: [clangd] workspace/symbol should be async, it reads from the index. Summary: To enable this, TUScheduler has to provide a way to run async tasks without needing

[clang-tools-extra] r345716 - [clang-tidy] Remove false decoupling in ClangTidyContext. NFC

2018-10-31 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 31 06:08:19 2018 New Revision: 345716 URL: http://llvm.org/viewvc/llvm-project?rev=345716&view=rev Log: [clang-tidy] Remove false decoupling in ClangTidyContext. NFC These getters/setters don't encapsulate any behavior, and can only be called by friends. Modified:

[clang-tools-extra] r351041 - [clangd] Index main-file symbols (bug 39761)

2019-01-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 14 02:01:17 2019 New Revision: 351041 URL: http://llvm.org/viewvc/llvm-project?rev=351041&view=rev Log: [clangd] Index main-file symbols (bug 39761) Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D55185 Modified: clang-tools-extra/trun

r351047 - [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 14 02:31:42 2019 New Revision: 351047 URL: http://llvm.org/viewvc/llvm-project?rev=351047&view=rev Log: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on. Summary: This fixes ASTContext's parent map for nodes in such classes (e.g. opera

[clang-tools-extra] r351048 - [clang-tidy] update FunctionSizeCheck for D56444

2019-01-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 14 02:40:41 2019 New Revision: 351048 URL: http://llvm.org/viewvc/llvm-project?rev=351048&view=rev Log: [clang-tidy] update FunctionSizeCheck for D56444 Reviewers: JonasToth, aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews

[clang-tools-extra] r351051 - [clangd] Unlink VFS working dir from OS working dir.

2019-01-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 14 03:06:48 2019 New Revision: 351051 URL: http://llvm.org/viewvc/llvm-project?rev=351051&view=rev Log: [clangd] Unlink VFS working dir from OS working dir. A lot of our previous FS manipulation was thread-unsafe in practice with the RealFS implementation. This sw

r351075 - [AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes).

2019-01-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 14 09:16:00 2019 New Revision: 351075 URL: http://llvm.org/viewvc/llvm-project?rev=351075&view=rev Log: [AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes). Summary: Prior to r351069, lambda classes were traversed or not depending on the

[clang-tools-extra] r351307 - [clang-tidy] Avoid fuchsia-overloaded-operator false positive with lambdas after r351047

2019-01-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 16 00:29:54 2019 New Revision: 351307 URL: http://llvm.org/viewvc/llvm-project?rev=351307&view=rev Log: [clang-tidy] Avoid fuchsia-overloaded-operator false positive with lambdas after r351047 Modified: clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOper

r351316 - Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

2019-01-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 16 01:41:26 2019 New Revision: 351316 URL: http://llvm.org/viewvc/llvm-project?rev=351316&view=rev Log: Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database. This reverts commit r351282, and re-lands r351222

Re: r351316 - Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

2019-01-16 Thread Sam McCall via cfe-commits
+Ilya who understands the test better... Some are fixed by r351334 with -target, Ilya could you take a look at windows? Otherwise we could use REQUIRES... On Wed, Jan 16, 2019, 15:16 Jeremy Morse Hi Sam, > > Unfortunately this trips up a variety of buildbots: > > http://lab.llvm.org:8011/bui

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
t; wrote: > I don't have a reduced test case yet, but this seems to cause clang to > sometimes claim that an included file isn't found even if it's there, at > least on macOS: > https://bugs.chromium.org/p/chromium/issues/detail?id=924225 > > On Mon, Nov 19, 2018 at 8:

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
(Email is better than IRC if that's OK - I don't know this code that well so it takes me a while). Thanks, that's definitely interesting and not what I expected. I thought every call sequence r347205 changed the behavior of would have resulted in two calls to getStatValue(). I guess the "pch"/"mai

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
Thanks! given that we don't see an earlier stat, I guess these files were being treated as virtual (file metadata deserialized from PCH). Previously despite the open=true these never actually got opened, and that worked fine. I'm away from my computer but will verify later tonight or in the mornin

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-24 Thread Sam McCall via cfe-commits
Thanks for all the digging! I can reproduce locally with your last example and ulimit -n 1000. So it sounds like: - this *is* actually the interaction/behavior I expected from FileManager (we call first with openFile=false then with openFile=true, and the file is opened the second time) - the pr

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-24 Thread Sam McCall via cfe-commits
So from my reading starting at getFileAndSuggestModule, changing to openFile=false is correct there unless some code is relying on that side effect. All the tests pass, too. The most likely regression is where we previously did open+fstat we'll now do stat+open+fstat. I tried running three comman

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-24 Thread Sam McCall via cfe-commits
Sure. Op counts and linux benchmarks are easy, I could try to get access to mac/windows too... Building clang's HeaderSearch.cpp (without PCH) yields: master: fstat = 341, open = 1039, stat = 211 openFile=false: fstat = 9 (-332), open = 379 (-660), stat = 1203 (+992) revert: fstat = 341 (+0), open

r352079 - [FileManager] Revert r347205 to avoid PCH file-descriptor leak.

2019-01-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 24 10:55:24 2019 New Revision: 352079 URL: http://llvm.org/viewvc/llvm-project?rev=352079&view=rev Log: [FileManager] Revert r347205 to avoid PCH file-descriptor leak. Summary: r347205 fixed a bug in FileManager: first calling getFile(shouldOpen=false) and then get

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-24 Thread Sam McCall via cfe-commits
Reverted as r352079, with a test derived from this thread. https://bugs.llvm.org/show_bug.cgi?id=40448 to cherrypick to branch. I'll work on relanding a fixed version soon. Thanks again for investigating, and sorry for the trouble. On Thu, Jan 24, 2019 at 5:05 PM Sam McCall wrote: > Sure. Op co

Re: r352079 - [FileManager] Revert r347205 to avoid PCH file-descriptor leak.

2019-01-28 Thread Sam McCall via cfe-commits
for file /clangd-test/foo.cpp > > > Testing Time: 5.30s > > Failing Tests (1): > Extra Tools Unit Tests :: clangd/./ClangdTests/GoToInclude.All > > Expected Passes: 1123 > Expected Failures : 1 > Unsupported Tests

[clang-tools-extra] r345961 - [clang-tidy] Get ClangTidyContext out of the business of storing diagnostics. NFC

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 03:01:59 2018 New Revision: 345961 URL: http://llvm.org/viewvc/llvm-project?rev=345961&view=rev Log: [clang-tidy] Get ClangTidyContext out of the business of storing diagnostics. NFC Summary: Currently ClangTidyContext::diag() sends the diagnostics to a Diagnos

[clang-tools-extra] r345968 - [clangd] Only log ignored diagnostics with -log=verbose.

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 05:51:26 2018 New Revision: 345968 URL: http://llvm.org/viewvc/llvm-project?rev=345968&view=rev Log: [clangd] Only log ignored diagnostics with -log=verbose. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differ

[clang-tools-extra] r345969 - [clangd] Remove didOpen extraFlags extension.

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 06:06:55 2018 New Revision: 345969 URL: http://llvm.org/viewvc/llvm-project?rev=345969&view=rev Log: [clangd] Remove didOpen extraFlags extension. Summary: This was added in D34947 to support YCM, but YCM actually provides *all* args, and this was never actually

[clang-tools-extra] r345970 - [clangd] Make in-memory CDB always available as an overlay, refactor.

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 06:09:36 2018 New Revision: 345970 URL: http://llvm.org/viewvc/llvm-project?rev=345970&view=rev Log: [clangd] Make in-memory CDB always available as an overlay, refactor. Summary: The new implementation is a GlobalCompilationDatabase that overlays a base. Normal

[clang-tools-extra] r345973 - [clangd] Add fallbackFlags initialization extension.

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 07:07:51 2018 New Revision: 345973 URL: http://llvm.org/viewvc/llvm-project?rev=345973&view=rev Log: [clangd] Add fallbackFlags initialization extension. Summary: This allows customizing the flags used when no compile database is available. It addresses some use

Re: r345971 - Reapply Logging: make os_log buffer size an integer constant expression.

2018-11-02 Thread Sam McCall via cfe-commits
On Fri, Nov 2, 2018 at 4:08 PM Tim Northover wrote: > After that it was discovered OSLog depends on the other format helpers so > there was still a circular dependency; I decided adding the others was a > minor enough change to just go ahead. > Thanks - I missed the review. > On 2 Nov 2018, at 1

Re: [clang-tools-extra] r345961 - [clang-tidy] Get ClangTidyContext out of the business of storing diagnostics. NFC

2018-11-02 Thread Sam McCall via cfe-commits
Hi Tom, Sorry for missing this (too many email accounts). And thank you for the fix! On Fri, Nov 2, 2018 at 1:04 PM Tom Weaver wrote: > Hiya Sam, > > are you aware that r345961 caused a test failure on the following bot and > build > > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-sc

Re: [PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Sam McCall via cfe-commits
Yes, that's the intent, at least for now. Fine to eat all your cores, but background indexing isn't higher priority than anything else. On Fri, Nov 2, 2018 at 8:35 PM Joerg Sonnenberger wrote: > On Wed, Oct 31, 2018 at 08:53:03AM +, Sam McCall via Phabricator via > cfe-commits wrote: > > sam

Re: [PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Sam McCall via cfe-commits
Appreciate the input from everyone. This is an experimental feature that isn't hooked up anywhere yet, linux/glibc-only is fine for now. We can revisit once this code is actually used. (BTW musl seems to work fine: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_setschedparam.c) On Fr

[clang-tools-extra] r346054 - [clangd] don't buffer the input-mirror stream, it's used to diagnose crashes

2018-11-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 2 16:47:55 2018 New Revision: 346054 URL: http://llvm.org/viewvc/llvm-project?rev=346054&view=rev Log: [clangd] don't buffer the input-mirror stream, it's used to diagnose crashes Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Modified: clang-to

Re: [PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Sam McCall via cfe-commits
Disclaimer: I'm on a train with family today, and haven't actually read the patch... So I have concerns :-) 1. There's the usual concern that the current behavior is reasonable and people like it, so adding a second reasonable behavior provides a small amount of value to the userbase as a whole (

Re: [PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Sam McCall via cfe-commits
On Mon, Nov 5, 2018, 13:58 Ilya Biryukov via Phabricator < revi...@reviews.llvm.org wrote: > ilya-biryukov added a comment. > > > There's the usual concern that the current behavior is reasonable and > people like it. > > I think it would be reasonable to say that a large portion of C++ users > ar

[clang-tools-extra] r346219 - [clang-tidy] run() doesn't update the SourceManager.

2018-11-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 6 01:28:23 2018 New Revision: 346219 URL: http://llvm.org/viewvc/llvm-project?rev=346219&view=rev Log: [clang-tidy] run() doesn't update the SourceManager. Summary: By now the context's SourceManager is now initialized everywhere that ClangTidyCheck::registerMatch

Re: [PATCH] D53651: [clangd] Use thread pool for background indexing.

2018-11-07 Thread Sam McCall via cfe-commits
On Wed, Nov 7, 2018 at 10:32 AM Mikael Holmén via Phabricator < revi...@reviews.llvm.org> wrote: > uabelho added a comment. > > Hi, > > I've got a post-review comment about the use of SCHED_IDLE vs the needed > gcc version. > > > > > Comment at: clang-tools-extra/trunk/clangd/Thre

Re: [PATCH] D53651: [clangd] Use thread pool for background indexing.

2018-11-07 Thread Sam McCall via cfe-commits
I'll send a patch shortly to unbreak this. Is emitting a warning a problem for you? (i.e. do you build with -Werror) I'd like to do something like #ifdef SCHED_IDLE ... #else #warning "old libc?" #endif That way if this isn't actually working we'll break in linux configurations covered by -Werror

[clang-tools-extra] r346312 - [clangd] Fix mainfile filtering for diagnostics: don't emit diagnostics for builtin headers. (Relevant for clang-tidy)

2018-11-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 7 05:21:09 2018 New Revision: 346312 URL: http://llvm.org/viewvc/llvm-project?rev=346312&view=rev Log: [clangd] Fix mainfile filtering for diagnostics: don't emit diagnostics for builtin headers. (Relevant for clang-tidy) Modified: clang-tools-extra/trunk/cla

r346414 - [Tooling] Produce diagnostics for missing input files.

2018-11-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 8 08:57:01 2018 New Revision: 346414 URL: http://llvm.org/viewvc/llvm-project?rev=346414&view=rev Log: [Tooling] Produce diagnostics for missing input files. Summary: This was disabled way back in 2011, in the dark times before Driver was VFS-aware. Also, make d

[clang-tools-extra] r346415 - [clang-tidy] fix test after r346414

2018-11-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 8 09:10:31 2018 New Revision: 346415 URL: http://llvm.org/viewvc/llvm-project?rev=346415&view=rev Log: [clang-tidy] fix test after r346414 Modified: clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/diagn

[clang-tools-extra] r346418 - [clang-tidy] Untangle layering in ClangTidyDiagnosticConsumer somewhat. NFC

2018-11-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 8 09:42:16 2018 New Revision: 346418 URL: http://llvm.org/viewvc/llvm-project?rev=346418&view=rev Log: [clang-tidy] Untangle layering in ClangTidyDiagnosticConsumer somewhat. NFC Summary: Clang's hierarchy is CompilerInstance -> DiagnosticsEngine -> DiagnosticCon

r346485 - [Tooling] Avoid diagnosing missing input files in an edge-case where it's incorrect.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 03:49:22 2018 New Revision: 346485 URL: http://llvm.org/viewvc/llvm-project?rev=346485&view=rev Log: [Tooling] Avoid diagnosing missing input files in an edge-case where it's incorrect. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/To

[clang-tools-extra] r346488 - [clangd] Make TestTU build with preamble, and fix the fallout.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 04:56:49 2018 New Revision: 346488 URL: http://llvm.org/viewvc/llvm-project?rev=346488&view=rev Log: [clangd] Make TestTU build with preamble, and fix the fallout. Our testing didn't reflect reality: live clangd almost always uses a preamble, and sometimes the p

Re: r345971 - Reapply Logging: make os_log buffer size an integer constant expression.

2018-11-09 Thread Sam McCall via cfe-commits
Sorry I lost track of this. Having understood the code a bit more, the current split between the AST/analysis/static analyzer isn't as clear as I thought. So I'm not sure the layering is perfect here, but the fault doesn't lie with your patch. Sorry for the noise. On Fri, Nov 2, 2018 at 5:43 PM Ti

[clang-tools-extra] r346503 - [clangd] Don't treat top-level decls as "local" if they are from the preamble.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 07:35:00 2018 New Revision: 346503 URL: http://llvm.org/viewvc/llvm-project?rev=346503&view=rev Log: [clangd] Don't treat top-level decls as "local" if they are from the preamble. Summary: These get passed to HandleTopLevelDecl() if they happen to have been dese

[clang-tools-extra] r346638 - [clangd] Fix compile on very old glibc

2018-11-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Nov 12 00:17:49 2018 New Revision: 346638 URL: http://llvm.org/viewvc/llvm-project?rev=346638&view=rev Log: [clangd] Fix compile on very old glibc Modified: clang-tools-extra/trunk/clangd/Threading.cpp Modified: clang-tools-extra/trunk/clangd/Threading.cpp URL: h

<    1   2   3   4   5   6   7   8   9   10   >