[PATCH] D49543: [clangd] Penalize non-instance members when accessed via class instances.

2018-07-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:146 +return false; + if (const auto *CM = dyn_cast(ND)) +return !CM->isStatic(); sammccall wrote: > I think we also have to consider template functions too? > And ideally I think we want to

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:211 + case Constructor: +Score *= 1.0f; // Rank class constructors after class types. +break; ilya-biryukov wrote: > NIT: This does not seem to change the score, right? Maybe just the

[PATCH] D49540: [clangd] FuzzyMatch exposes an API for its word segmentation. NFC

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49543: [clangd] Penalize non-instance members when accessed via class instances.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. The following are metrics for explicit member access completions. There is no noticeable impact on other completion types. Before:

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49476#1167294, @akyrtzi wrote: > Is it possible to add a regression test case ? I assume this is fixing some > issue, we should make sure we don't regress again. This fixes a downstream use case where we use `OrigD`. AFAICT, `c-index-test`

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/noctem/SearchToken.cpp:38 + +// FIXME(kbobyrev): Deal with short symbol symbol names. A viable approach would +// be generating unigrams and bigrams here, too. This would prevent symbol index

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337453: [CodeComplete] Fix accessibilty of protected members from base class. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337453: [CodeComplete] Fix accessibilty of protected members from base class. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D49421?vs=156146=156257#toc

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/test/clang-doc/yaml-record.cpp:44 +// CHECK-0: --- +// CHECK-0-NEXT: USR: '06B5F6A19BA9F6A832E127C9968282B94619B210' +// CHECK-0-NEXT: Name:'C' juliehockett wrote: > ioeric

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156146. ioeric marked an inline comment as done. ioeric added a comment. - addressed review comments. - Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D49421 Files: lib/Sema/SemaAccess.cpp lib/Sema/SemaCodeComplete.cpp

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaAccess.cpp:1871-1873 +// The access should be AS_none as we don't know how the member was +// accessed - `AccessedEntity::getAccess` describes what access was used to +// access an entity.

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156356. ioeric added a comment. - try to add a test case. Repository: rC Clang https://reviews.llvm.org/D49476 Files: lib/Index/IndexingContext.cpp test/Index/index-template-specialization.cpp tools/c-index-test/c-index-test.c

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49476#1168604, @akyrtzi wrote: > `CXIndexDataConsumer.cpp` uses `ASTNode.OrigD`, that code is exercised when > you run `c-index-test -index-file <...>`. I'd recommend to at least check if > that command would produce a different output for

[PATCH] D49780: [clangd] Use a sigmoid style function for #usages boost in symbol quality.

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. This has a shape to similar logrithm function but grows much slower for large #usages. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49780

[PATCH] D49780: [clangd] Use a sigmoid style function for #usages boost in symbol quality.

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 157207. ioeric marked 2 inline comments as done. ioeric added a comment. Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49780 Files: clangd/Quality.cpp unittests/clangd/CodeCompleteTests.cpp Index:

[PATCH] D49780: [clangd] Use a sigmoid style function for #usages boost in symbol quality.

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:200 +// f = 12.0 +// boost = f * sigmoid(m * std::log(References)) - 0.5 * f + 0.59 +// Sample data points: (10, 1.00), (100, 1.41), (1000, 1.82), ilya-biryukov wrote: > Made add

[PATCH] D49780: [clangd] Use a sigmoid style function for #usages boost in symbol quality.

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 157225. ioeric added a comment. s/better/nicely/ Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49780 Files: clangd/Quality.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.cpp

[PATCH] D49780: [clangd] Use a sigmoid style function for #usages boost in symbol quality.

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE337907: [clangd] Use a sigmoid style function for #usages boost in symbol quality. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D49780?vs=157225=157226#toc

[PATCH] D49785: [clangd] Give an example for global-symbol-builder usage

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:153 - const char* Overview = - "This is an **experimental** tool to

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Implementation is in a good shape. I only have nits ;) Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:18 +namespace clangd { +namespace dex { + Please put all local classes and helpers in an anonymous namespace.

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/TUScheduler.cpp:357 + +bool CanReuseAST = InputsAreTheSame && OldPreamble == NewPreamble; { nit: `(OldPreamble == NewPreamble)` Do you intend to compare the shared pointer instead of the values?

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Comment at: clangd/TUScheduler.cpp:360 std::lock_guard Lock(Mutex); + OldPreamble.reset(); if (NewPreamble) ilya-biryukov wrote: >

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a subscriber: malaperle. ioeric added a comment. It would make it easier for your reviewers to look at the new changes if you just reopen this patch and update the diff :) Repository: rC Clang https://reviews.llvm.org/D48903 ___

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156056. ioeric marked 4 inline comments as done. ioeric added a comment. - addressed review comments. Repository: rC Clang https://reviews.llvm.org/D49421 Files: lib/Sema/SemaAccess.cpp lib/Sema/SemaCodeComplete.cpp

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Comment at: lib/Sema/SemaAccess.cpp:1871-1873 +// The access should be AS_none as we don't know how the member was +// accessed - `AccessedEntity::getAccess` describes what access was used to +// access an entity.

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: akyrtzi, arphaman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D49476 Files: lib/Index/IndexingContext.cpp Index: lib/Index/IndexingContext.cpp

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Some high-level comments before jumping into details. Comment at: clang-tools-extra/clangd/index/noctem/SearchAtom.cpp:23 + +// FIXME(kbobyrev): Deal with short symbol symbol names. +std::vector generateSearchAtoms(StringRef SymbolName) {

[PATCH] D51292: [docs] Update clang-rename documentation

2018-08-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/docs/clang-rename.rst:140 + +:program:`clangd `_ uses +:program:`clang-rename` infrastructure to handle renaming requests. Currently, nit: `clangd *shares* the

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/tool/ClangdMain.cpp:86 + return nullptr; +Index = AsyncLoad.get(); +return Index.get(); ilya-biryukov wrote: > ioeric wrote: > > ilya-biryukov wrote: > > > ioeric wrote: > > > > ilya-biryukov wrote: >

[PATCH] D51291: [clangd] Support multiple #include headers in one symbol.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 163351. ioeric added a comment. - Return all possible #includes in CodeComplete. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51291 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.cpp clangd/index/Index.h

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D51475#1219291, @sammccall wrote: > I don't have a strong opinion on async vs sync - startup time is important > and we shouldn't block simple AST-based functionality on the index, but this > introduces some slightly confusing UX for that

[PATCH] D51422: [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.h:47 + // The shared_ptr keeps the symbols alive. + std::shared_ptr buildMemIndex(); Maybe avoid hardcoding the index name, so that we could potentially switch to use a different index

[PATCH] D51422: [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex.

2018-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/dex/DexIndex.h:42 + // All symbols must outlive this index. + template DexIndex(Range &) { +for (auto & : Symbols) Why is this constructor needed? I think this could restrict the flexibility of

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:137 + BoostingIterators.push_back( + createBoost(create(It->second), P.second + 10)); + } Could you comment on `P.second + 10` here? It sounds

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:275 return EC; - return Dir.str().str(); + CWDCache = Dir.str(); + return CWDCache; sammccall wrote: > Doesn't this need to be guarded by a lock? I know the current version is >

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 163858. ioeric marked an inline comment as done. ioeric added a comment. - Guard CWDCache with mutex. Repository: rC Clang https://reviews.llvm.org/D51641 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric requested changes to this revision. ioeric added a comment. This revision now requires changes to proceed. This should be the last round! ;) Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:45 +std::vector> +createPathIterators(llvm::ArrayRef ProximityPaths,

[PATCH] D51675: [Sema] Store MacroInfo in CodeCompletionResult for macro results.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164044. ioeric added a comment. - update comment about missing MacroInfo. Repository: rC Clang https://reviews.llvm.org/D51675 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp tools/libclang/CXCursor.cpp Index:

[PATCH] D51675: [Sema] Store MacroInfo in CodeCompletionResult for macro results.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:847 + /// If the result is RK_Macro, this can store the information about the macro + /// definition. sammccall wrote: > Let's not make this maybe/optional: `If the result is

[PATCH] D51675: [Sema] Store MacroInfo in CodeCompletionResult for macro results.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341476: [Sema] Store MacroInfo in CodeCompletionResult for macro results. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D51641 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp

[PATCH] D51688: [clangd] Set SymbolID for sema macros so that they can be merged with index macros.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164055. ioeric added a comment. - Set name for the test symbol. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51688 Files: clangd/AST.cpp clangd/AST.h clangd/CodeComplete.cpp clangd/index/SymbolCollector.cpp

[PATCH] D51688: [clangd] Set SymbolID for sema macros so that they can be merged with index macros.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51688 Files: clangd/AST.cpp clangd/AST.h clangd/CodeComplete.cpp

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/URI.cpp:200 + return make_string_error("Couldn't convert " + AbsolutePath + + " to any given scheme.");

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 163986. ioeric marked an inline comment as done. ioeric added a comment. - s/Mutex/CWDMutex/ Repository: rC Clang https://reviews.llvm.org/D51641 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp

[PATCH] D51688: [clangd] Set SymbolID for sema macros so that they can be merged with index macros.

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164177. ioeric marked 2 inline comments as done. ioeric added a comment. - improve comment; remove dead code. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51688 Files: clangd/AST.cpp clangd/AST.h clangd/CodeComplete.cpp

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Also set "deprecated" field in LSP CompletionItem. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51724 Files:

[PATCH] D51688: [clangd] Set SymbolID for sema macros so that they can be merged with index macros.

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341534: [clangd] Set SymbolID for sema macros so that they can be merged with index… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Dropping this in favor of https://reviews.llvm.org/D51638 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Super cool! Just a few nits. Comment at: clangd/RIFF.cpp:58 + if (RIFF->ID != fourCC("RIFF")) +return makeError("Extra content after RIFF chunk"); + if (RIFF->Data.size() < 4) The error message seems wrong?

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51638: [clangd] Load static index asynchronously, add tracing.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg. Thanks! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. There are a few changes/refactorings which I would suggest splitting from this patch, as they would require more thoughts and seem unrelated in this patch. Please see the inline comments :) Comment at: clang-tools-extra/clangd/Quality.h:130 +///

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric requested changes to this revision. ioeric added a comment. This revision now requires changes to proceed. (and forgot to request changes ;) https://reviews.llvm.org/D51481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Protocol.cpp:520 Result["additionalTextEdits"] = json::Array(CI.additionalTextEdits); + if (CI.deprecated) +Result["deprecated"] = CI.deprecated; sammccall wrote: > do we actually want this in JSON? >

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164205. ioeric marked an inline comment as done. ioeric added a comment. - Pack flags in Symbol. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51724 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Protocol.cpp

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341576: [clangd] Add Deprecated field to Symbol and CodeCompletion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D51724?vs=164259=164260#toc Repository:

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164258. ioeric marked 5 inline comments as done. ioeric added a comment. - addressed review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51724 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Protocol.cpp

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

2018-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 164259. ioeric added a comment. - merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51724 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Protocol.cpp clangd/Protocol.h clangd/Quality.cpp

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

2018-09-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Diagnostics.cpp:299 +D.Severity = +D.Category == "Deprecations" ? DiagnosticsEngine::Note : DiagLevel; return D; kadircet wrote: > Couldn't find a better way to check for this one. Category types

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

2018-09-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:144 +size_t FileIndex::estimateMemoryUsage() const { + return FSymbols.estimateMemoryUsage(); +} This can be a bit tricky. Generally, the size of a `FileIndex` is the size of

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

2018-09-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:144 +size_t FileIndex::estimateMemoryUsage() const { + return FSymbols.estimateMemoryUsage(); +} sammccall wrote: > ioeric wrote: > > This can be a bit tricky. Generally, the

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

2018-09-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D51297#1228441, @kbobyrev wrote: > In https://reviews.llvm.org/D51297#1225546, @ilya-biryukov wrote: > > > I would stamp this from my side, but concerns whether we should recommend > > YCM's LSP-based completer instead are probably still

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

2018-09-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/Index.h:512 llvm::function_ref) const override; + void lookup(const LookupRequest &,

[PATCH] D51860: [clangd] NFC: Use uint32_t for FuzzyFindRequest limits

2018-09-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/Index.cpp:186 + O.map("ProximityPaths", Request.ProximityPaths); + if (OK) +Request.MaxCandidateCount = MaxCandidateCount; I think we should not set `Request.MaxCandidateCount` if

[PATCH] D51864: [Tooling] Restore working dir in ClangTool.

2018-09-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Repository: rC Clang https://reviews.llvm.org/D51864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51528: [NFC] Cleanup Dex

2018-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:33 std::vector Result = generateIdentifierTrigrams(Sym.Name); -

[PATCH] D51407: [Tooling] Do not restore working dir in ClangTool

2018-08-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Comment at: lib/Tooling/Tooling.cpp:202 -std::string getAbsolutePath(StringRef File) { +static llvm::Expected getAbsolutePath(vfs::FileSystem , +

[PATCH] D51504: [clangd] Flatten out Symbol::Details. It was ill-conceived, sorry.

2018-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. lg Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-09-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric 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] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:59 LookupTable[Sym->ID] = Sym; -SymbolQuality[Sym] = quality(*Sym); +SymbolAndScores[I] = {Sym, static_cast(quality(*Sym))}; } ioeric wrote: > ioeric wrote:

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341455: [VFS] Cache the current working directory for the real FS. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D51641?vs=163986=163994#toc Repository: rC

[PATCH] D51675: [Sema] Store MacroInfo in CodeCompletionResult for macro results.

2018-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added a subscriber: cfe-commits. This provides information about the macro definition. For example, it can be used to compute macro USRs. Repository: rC Clang https://reviews.llvm.org/D51675 Files:

[PATCH] D51475: [clangd] Load YAML static index asyncrhonously.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, kbobyrev. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Loading static index can be slow (>10s for LLVM index). This allows the clangd server to be initialized before index is

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 163276. ioeric added a comment. - revert unintended change Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51475 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Some high-level comments :) Comment at: clang-tools-extra/clangd/index/dex/DexIndex.h:45 + void build(std::shared_ptr> Symbols, + llvm::ArrayRef URISchemes); URI schemes are property of `Symbols`. We shouldn't need to

[PATCH] D51860: [clangd] NFC: Use uint32_t for FuzzyFindRequest limits

2018-09-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:440 /// return more than this, e.g. if it doesn't know which candidates are best. - size_t MaxCandidateCount = std::numeric_limits::max(); + uint32_t MaxCandidateCount =

[PATCH] D51860: [clangd] NFC: Use uint32_t for FuzzyFindRequest limits

2018-09-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/Index.h:440 /// return more than this, e.g. if it doesn't know which candidates are best. - size_t MaxCandidateCount =

[PATCH] D48724: [clangd] Log sema completion context kind and query scopes. NFC

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154185. ioeric added a comment. -Rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48724 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp === ---

[PATCH] D48933: [clangd] Treat class constructor as in the same scope as the class in ranking.

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154182. ioeric added a comment. - Refactored findAnyDecl. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48933 Files: clangd/Quality.cpp unittests/clangd/QualityTests.cpp unittests/clangd/TestTU.cpp unittests/clangd/TestTU.h Index:

[PATCH] D48724: [clangd] Log sema completion context kind and query scopes. NFC

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE336321: [clangd] Log sema completion context kind and query scopes. NFC (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D48724?vs=154185=154186#toc Repository:

[PATCH] D48933: [clangd] Treat class constructor as in the same scope as the class in ranking.

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE336318: [clangd] Treat class constructor as in the same scope as the class in ranking. (authored by ioeric, committed by ). Changed prior to commit:

[PATCH] D48961: [Index] Add indexing support for MACROs.

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: akyrtzi, arphaman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48961 Files: include/clang/Index/IndexDataConsumer.h include/clang/Index/IndexSymbol.h lib/Index/IndexSymbol.cpp

[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added a subscriber: cfe-commits. The method only takes PPreprocessor and don't require structures that might not be available (e.g. Sema and ASTContext) when CodeCompletionString needs to be generated for macros.

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48917 Files: lib/Sema/SemaCodeComplete.cpp unittests/Sema/CodeCompleteTest.cpp Index: unittests/Sema/CodeCompleteTest.cpp

[PATCH] D48933: [clangd] Treat class constructor as in the same scope as the class in ranking.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48933 Files: clangd/Quality.cpp unittests/clangd/QualityTests.cpp Index:

[PATCH] D48341: [clang-doc] Adding a second reduce pass

2018-07-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the refactoring and the comments! They made it a lot easier to understand the changes. I'm focusing on how the changes would fit into the `ToolExecutor` framework in the review and will leave tool-specific logics to another reviewer who I assume would know

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:88 +(CI.getDiagnosticClient().getNumErrors() > 0)) { + llvm::errs() << "Found errors in the translation unit. Igoring " + "collected

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154077. ioeric added a comment. - Addressed review comment. Repository: rC Clang https://reviews.llvm.org/D48917 Files: lib/Sema/SemaCodeComplete.cpp unittests/Sema/CodeCompleteTest.cpp Index: unittests/Sema/CodeCompleteTest.cpp

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a subscriber: sammccall. ioeric added a comment. Hi Carlos, thanks for letting us know! I sent r336249 to fix the windows test. Repository: rL LLVM https://reviews.llvm.org/D48441 ___ cfe-commits mailing list

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336252: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336255: [SemaCodeComplete] Make sure visited contexts are passed to completion results… (authored by ioeric, committed by ). Changed prior to commit:

[PATCH] D48961: [Index] Add indexing support for MACROs.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154367. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed review comments. Expose create a PPCallbacks for indexing macros. Repository: rC Clang https://reviews.llvm.org/D48961 Files: include/clang/Index/IndexDataConsumer.h

[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154369. ioeric added a comment. - Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D48973 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp Index: lib/Sema/SemaCodeComplete.cpp

[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:921 bool IncludeBriefComments); + CodeCompletionString * + CreateCodeCompletionStringForMacro(Preprocessor , sammccall wrote: >

[PATCH] D48961: [Index] Add indexing support for MACROs.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! In https://reviews.llvm.org/D48961#1152999, @sammccall wrote: > I worry this is a trap: the indexing infrastructure here is designed so you > can run it as a frontendaction, on an ASTUnit, or by passing a set of top > level decls. > However the

[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154370. ioeric added a comment. - Merged with orgin/master Repository: rC Clang https://reviews.llvm.org/D48973 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp Index: lib/Sema/SemaCodeComplete.cpp

[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.

2018-07-06 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336427: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D48973?vs=154370=154380#toc

<    5   6   7   8   9   10   11   12   13   14   >