ilya-biryukov added a comment.
Thanks! The only major comment I have is about the `FixItsScore`, others are
mostly NITs.
Comment at: clangd/Quality.cpp:298
+FixItCount += FixIt.CodeToInsert.size();
+ }
}
NIT: remove braces around single-statement loop bo
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM, with a few NITs.
Thanks for the change!
Comment at: clangd/Quality.h:81
+ bool NeedsFixIts =
+ false; // Whether fixits needs to be applied for that
ilya-biryukov added a comment.
+1 Sam's suggestion of configuring this during initial LSP handshake, rather
than as a command-line flag.
We could put it into `ClientCapabilities` or into `initializationOptions`. The
latter has type 'any' in LSP, so it seems to be most in-line with the protocol
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50154#1191002, @dblaikie wrote:
> What's the motivation for clangd to differ from clang here?
The presentation of diagnostics to the users is different between clang and
clangd:
- clang diagnostics are always prefixed with the file,
ilya-biryukov added a comment.
Maybe split the commit message into multiple lines?
I suggest we wait for clangd changes to be reviewed and land them together, so
that we have the tests and usages of this code.
Other than that LG
Comment at: include/clang/Lex/Preprocessor.h:11
ilya-biryukov added a comment.
Short summary of the offline discussion: I suggest adding this parameter into
the corresponding requests of the index (FuzzyFindRequest,
FindDefinitionsRequest) instead of stashing it in the context. Context has all
the same problems as the global variables, so we
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:162
+WithContextValue WithFileName(kActiveFile, File);
// FIXME(ibiryukov): even if Preamble is non-null, we may want to check
ioeric wrote:
> ilya-biryukov wrote:
> > If we want
ilya-biryukov added a comment.
The new behavior looks reasonable for interactive tools like clangd, but I'm a
bit worried that clang may emit too many irrelevant errors, because it may not
cope nicely with those fatal errors, i.e. wasn't tested that thoroughly in that
mode.
Nevertheless, I thin
ilya-biryukov added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:441
const clangd::CodeCompleteOptions &CCOpts,
+ const ClangdDiagnosticOptions &DiagOpts,
llvm::Optional
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
Comment at: clangd/TUScheduler.h:145
};
+
} // namespace clangd
NIT: accidental whitespace change?
Repository:
rCTE Clang T
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:289
}
+ std::stable_sort(Completion.FixIts.begin(), Completion.FixIts.end(),
+ [](const TextEdit &X, const TextEdit &Y) {
We shouldn't have duplicate/overla
ilya-biryukov added a comment.
I have left a few comments, but wanted to start with a higher-level design
consideration.
I believe we should probably expose the cancellations in the ClangdServer API
directly.
The reasons for that are:
1. We have an internal client that would also benefit from
ilya-biryukov added a comment.
Only a few NITs from my side.
Excited for this fix to get in, have been seeing duplicate in other cases too
:-)
Comment at: clangd/SourceCode.h:69
+llvm::Optional getRealPath(const FileEntry *F,
+const So
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a small NIT.
Comment at: clangd/ClangdLSPServer.cpp:507
+}
+LSPDiag["clangd.fixes"] = std::move(ClangdFixes);
+ }
---
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:715
unsigned NumCandidates) override {
+TopN Top(
+std::numeric_limits::max());
Maybe use `vector`, followed by `std::sort` at the end?
Or is t
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks for the change!
Could we add an option to clangd to switch it on? (VSCode does not work, but
our hacked-up ycm integration seems to work, right?)
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM with a few NITs
Comment at: clangd/CodeComplete.cpp:687
+struct ScoredSignatureGreater {
+ bool operator()(const ScoredSignature &L, const ScoredS
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM, but let's land together with a dependent revision to hove some code that
actually tests it.
Comment at: include/clang/Lex/Preprocessor.h:313
+ /// Ran
ilya-biryukov added a comment.
NIT: maybe also note the number of the clangd revision in this change's
description
Repository:
rC Clang
https://reviews.llvm.org/D50443
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org
ilya-biryukov added inline comments.
Comment at: clangd/Diagnostics.h:40
DiagnosticsEngine::Level Severity = DiagnosticsEngine::Note;
+ unsigned Category;
// Since File is only descriptive, we store a separate flag to distinguish
Maybe store the string nam
ilya-biryukov added a comment.
Maybe also add a test for find-definition that was broken before? (non-empty
preamble -> empty preamble -> bad gotodef that goes to included file instead of
the local variable)
To have a regression test against similar failures.
Comment at: unit
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rC Clang
https://reviews.llvm.org/D50628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
ilya-biryukov added inline comments.
Comment at: clangd/XRefs.cpp:71
+struct DeclInfo {
+ const Decl *D;
NIT: maybe call `Occurence` instead? As this is actually a `Decl` with some
extra data, computed based on the expression it originated from. Occurence
se
ilya-biryukov created this revision.
ilya-biryukov added reviewers: hokein, ioeric, kadircet.
Herald added subscribers: arphaman, jkorous, MaskRay.
To avoid producing very verbose output in substitutions involving
typedefs, e.g.
T -> std::vector::iterator
gets turned into an unreadable mess wh
ilya-biryukov updated this revision to Diff 160536.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Use 'auto*' instead of 'auto'
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50645
Files:
clangd/CodeComplete.cpp
unittests/clangd/CodeComple
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:721
+ // would get 'std::basic_string').
+ if (auto Func = Candidate.getFunction()) {
+if (auto Pattern = Func->getTemplateInstantiationPattern())
hokein wrote:
> nit: auto
ilya-biryukov added a comment.
Sorry for missing this one. The biggest concern that I have is about the
thread-safety of the API, it's too easy to misuse from multiple threads at this
point.
We should define thread-safety guarantees for `TaskHandle` and
`CancellationToken` and make sure they'r
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Many thanks for fixing this.
Adding some failure monitoring seems like a nice idea. On the other hand,
polluting every test with stderr redirection doesn't look like a nice
ilya-biryukov added a comment.
Haven't noticed Alex's comments, sorry for a duplicate suggestion about exiting
with failure error code
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50641
___
cfe-commits mailing list
cfe-commits@li
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Let's watch out for possible breakages in any of the clients, though.
I've checked VSCode and it seems to be fine with the added fields.
Repository:
rCTE Clang Tools Ex
ilya-biryukov created this revision.
ilya-biryukov added reviewers: hokein, ioeric, kadircet.
Herald added subscribers: arphaman, jkorous, MaskRay.
Previously, clangd was trying to show documentation for the active
parameter instead, which is wrong per LSP specification.
Moreover, the code path t
ilya-biryukov created this revision.
ilya-biryukov added reviewers: hokein, ioeric, kadircet.
Herald added subscribers: arphaman, mgrang, jkorous, MaskRay.
Sema can only be used for documentation in the current file, other doc
comments should be fetched from the index.
Repository:
rCTE Clang T
ilya-biryukov added a comment.
There's a test for the new behavior in https://reviews.llvm.org/D50726
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org
ilya-biryukov updated this revision to Diff 160647.
ilya-biryukov added a comment.
- run clang-format
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50727
Files:
clangd/ClangdServer.cpp
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/index/Index.cpp
clangd/index/
ilya-biryukov added a comment.
+1 to having a separate option for that. More generally, wouldn't we want to
exit on more kinds errors in the future?
JSON parsing errors is something that popped up recently, but the option only
for that looks too narrow. We might end up wanting more options like
ilya-biryukov added a comment.
Thanks, we were previously getting inconsistent ASTs (i.e. using different
preambles), depending on whether they were built in `TUScheduler::update` or in
`TUScheduler::runWithAST` handlers.
Just a few NITs.
Comment at: clangd/TUScheduler.cpp:37
ilya-biryukov added a comment.
Mostly LSP-specific comments and comments about making TaskHandle thread-safe.
I'm also starting to wonder if the scope of this patch is too big, we could
potentially split it into three separate bits:
1. Generic cancellation API, i.e. `Cancellation.h` and unit-te
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50627#1198595, @hokein wrote:
> I think this patch is in a good scope (for empty preamble). I'd leave it as
> it is. The failure of GoTodefinition test is caused by an inconsistent
> behavior of using `lastBuiltPreamble`/`NewPreamble`
ilya-biryukov added a comment.
The last set of comments is for the previous version, might be missing some
updates, sorry about that. Will make sure to review the one too!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50502
___
cf
ilya-biryukov updated this revision to Diff 160992.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Log on index request, remove FIXME that was addressed
- Remove SymbolID::forDecl, use existing helper instead
Repository:
rCTE Clang Tools Extra
https://reviews
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:742
+llvm::DenseMap FetchedDocs;
+if (Index) {
+ LookupRequest IndexRequest;
hokein wrote:
> nit: do we want to log anything here? It may be useful for debug.
Definitely useful.
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:755
+ });
+ log("SigHelp: requested docs for {0} symbols from the index, got {1} "
+ "symbols with non-empty docs in the response",
ioeric wrote:
> drive by: I think this
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:755
+ });
+ log("SigHelp: requested docs for {0} symbols from the index, got {1} "
+ "symbols with non-empty docs in the response",
ioeric wrote:
> hokein wrote:
> > ioeri
ilya-biryukov updated this revision to Diff 161011.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Expose getDeclComment instead of getDocComment
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50726
Files:
clangd/CodeComplete.cpp
clangd/Cod
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50385#1193600, @ioeric wrote:
> In https://reviews.llvm.org/D50385#1193545, @hokein wrote:
>
> > In https://reviews.llvm.org/D50385#1191914, @ioeric wrote:
> >
> > > 2 high-level questions:
> > >
> > > 1. What's the reason for having a s
ilya-biryukov added a comment.
Just drive-by comments, the maintainers of the code are in a much better
position to give feedback, of course.
Nevertheless, my few cents:
- Getting rid of a regex in favor of the explicit loop is definitely a good
thing. It's incredibly how much time is spent the
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: hokein.
Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, javed.absar.
Will be used for updating the dynamic index on updates to the open files.
Currently we collect only information coming from the preamble
AST. This
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM, but note the comment: we don't need `ASSERT_TRUE(bool(Preamble))`.
Comment at: unittests/clangd/TUSchedulerTests.cpp:333
+ // We expe
ilya-biryukov updated this revision to Diff 161187.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Turn ifs to ternary ops
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50726
Files:
clangd/CodeComplete.cpp
clangd/CodeCompletionStrings.cpp
ilya-biryukov added inline comments.
Comment at: clangd/CodeCompletionStrings.cpp:52
// get this declaration, so we don't show documentation in that case.
if (Result.Kind != CodeCompletionResult::RK_Declaration)
return "";
ioeric wrote:
> `RK_Pattern`
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50847#1202658, @ioeric wrote:
> > Dynamic index misses important information from the body of the file, e.g.
> > locations of definitions
> > XRefs cannot be collected at all, since we can only obtain full
> > information for the curr
ilya-biryukov created this revision.
ilya-biryukov added reviewers: hokein, ioeric.
Herald added subscribers: arphaman, jkorous, MaskRay.
It was previously only indexing the preamble decls. The new
implementation will index both the preamble and the main AST and
report both sets of symbols, prefer
ilya-biryukov added a comment.
@ioeric, specifically, see https://reviews.llvm.org/D50889 for an updated
FileIndex
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://
ilya-biryukov added a comment.
This is still WIP, but wanted to share anyway the progress anyway.
Need to fix the FIXMEs currently added to the code and add tests.
Comment at: clangd/index/FileIndex.cpp:81
if (!Slab)
FileToSlabs.erase(Path);
else
We
ilya-biryukov planned changes to this revision.
ilya-biryukov added a comment.
As discussed offline, we could instead have a two-layer scheme for dynamic
index. A top layer will contain main file symbols, second layer will contain
preamble symbols.
Repository:
rCTE Clang Tools Extra
https:/
ilya-biryukov 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
kadircet wrote:
> ioe
ilya-biryukov added a comment.
Why do we want an alternative mode for transferring fix-its and notes? Any
reason why our current model is bad?
One thing that comes to mind is inconsistency between clang and our model, but
I wonder where would it affect the user experience in a bad way?
Reposit
ilya-biryukov added a comment.
Mostly NITs, but please take a look at the `CancelParams` handling problem. I
believe there might be a potential bug hiding there :-)
Comment at: clangd/Cancellation.h:87
+/// Enables async tasks to check for cancellation signal, contains a read
ilya-biryukov added inline comments.
Comment at: clangd/XRefs.cpp:665
+std::vector references(ParsedAST &AST, Position Pos,
+ bool IncludeDeclaration,
+ const SymbolIndex *Index) {
Are we going to su
ilya-biryukov updated this revision to Diff 161260.
ilya-biryukov added a comment.
- Reverted changes to FileIndex, use merged index instead
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50889
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/index/FileIndex.cp
ilya-biryukov added a comment.
Still missing tests, but otherwise should be good to review.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50889
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/m
ilya-biryukov added inline comments.
Comment at: clangd/TUScheduler.cpp:406
// We only need to build the AST if diagnostics were requested.
if (WantDiags == WantDiagnostics::No)
return;
hokein wrote:
> The AST might not get built if `WantDiags::N
ilya-biryukov added a comment.
This change LG, but I would not commit it before we have an actual
implementation.
As soon as we have the `references` function in `ClangdUnit.cpp` implemented,
the merge of this change should be trivial.
Is there any value in committing empty stubs before an actu
ilya-biryukov added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:80
+ if (NormalizedID.front() == '"')
+NormalizedID = NormalizedID.substr(1, NormalizedID.size() - 2);
+ return NormalizedID;
This still misses string escaping issues. E.g. `"` will
ilya-biryukov added a comment.
Having unimplemented stubs in the codebase creates some confusion, but that's
my personal opinion. Not terribly opposed to that if others feel it's the right
way to go.
For experiments, we could simply patch this in locally without committing
upstream. With git i
ilya-biryukov added inline comments.
Comment at: clangd/Cancellation.h:96
+/// checks using it to avoid extra lookups in the Context.
+class CancellationToken {
+public:
ioeric wrote:
> As chatted offline, I have questions about the motivation of the
> `Cancella
ilya-biryukov added a comment.
Herald added a subscriber: kadircet.
Just to make sure I fully understand the use-case: could you elaborate a little
more? Do you need to get exactly the same set of notes that clang provides?
Our current model seems to follow the clang's model, but it removes some
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50703#1205167, @malaperle wrote:
> Nah, I guess other things are partial too, like Go to Definition. Let's
> assume they will be completed "soon" ;)
https://reviews.llvm.org/D50889 should finally add the symbols from the main
files.
ilya-biryukov added inline comments.
Comment at: clangd/Cancellation.h:96
+/// checks using it to avoid extra lookups in the Context.
+class CancellationToken {
+public:
ioeric wrote:
> ilya-biryukov wrote:
> > ioeric wrote:
> > > As chatted offline, I have quest
ilya-biryukov added a comment.
1. Can we put the helper that executes the tasks asynchronously with a stack
size into llvm's threading library (i.e. somewhere close to
`llvm::execute_on_thread`?) All platform-specific code is already there, we can
reuse most of the implementation too.
2. I wond
ilya-biryukov updated this revision to Diff 161694.
ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.
- Move DynamicIndex into ClangdServer.cpp
- Rename FileIdx to DynamicIdx
- Avoid modifying input args
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:70
+// FIXME(ibiryukov): this should be a generic helper instead.
+class NoopCallbacks : public ParsingCallbacks {
public:
ioeric wrote:
> Maybe provide noop implementations for `ParsingCal
ilya-biryukov added a comment.
In https://reviews.llvm.org/D50993#1207464, @Dmitry.Kozhevnikov wrote:
> Do you think it would be OK to have pthreads-only version there, with
> `std::thread` fallback on Windows? I'd like to avoid writing a Windows-only
> implementation myself, as it's a bit alie
ilya-biryukov updated this revision to Diff 161717.
ilya-biryukov added a comment.
- Provide noop callbacks implementation by default.
- Update docs.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50847
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/TUSchedul
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:73
+
+ void onPreambleAST(PathRef Path, ASTContext &Ctx,
+ std::shared_ptr PP) override {
hokein wrote:
> I think `Ctx` should be a `pointer` which gives us a way (passi
ilya-biryukov updated this revision to Diff 161718.
ilya-biryukov added a comment.
- Use noop callbacks from the parent revision
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50889
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/index/FileIndex.cpp
clangd/i
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
All the issues should be addressed at this point
Comment at: clangd/ClangdServer.cpp:70
+// FIXME(ibiryukov): this should be a generic helper instead.
+class NoopCallbacks : public ParsingCallbacks {
ilya-biryukov marked an inline comment as done.
ilya-biryukov added inline comments.
Comment at: clangd/index/FileIndex.h:70
+ void
+ update(PathRef Path, ASTContext *AST, std::shared_ptr PP,
+ llvm::Optional> TopLevelDecls = llvm::None);
hokein wrote:
ilya-biryukov added a comment.
Looking at this one. (to make sure we don't clash with @ioeric)
Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:111
+ const static unsigned DEFAULT_BOOST_SCORE;
+
Maybe make it `constexpr` and put the value into the h
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:92
+ /// function, the parameter is needed to propagate through the tree.
+ virtual unsigned boost(DocID ID) const = 0;
Maybe add a note to the comment on why an `I
ilya-biryukov added a comment.
LG, just a few last nits
Comment at: clangd/Cancellation.cpp:30
+
+TaskHandle createTaskHandle() { return std::make_shared(); }
+
NIT: maybe consider inlining it? Since Task has a public default constructor, I
don't think having
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, kbobyrev.
Herald added subscribers: kadircet, jfb, arphaman, jkorous, MaskRay.
Replace them with suffix mappings.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
Files:
clangd/index/CanonicalIncl
ilya-biryukov added a comment.
Herald added a subscriber: kadircet.
Sorry for the delay with this one
Comment at: unittests/clangd/ClangdTests.cpp:1002
+
+ auto MainFileCI = buildCompilerInvocation(PI);
+ auto AST =
Just reuse `PreambleCI`?
ilya-biryukov added a comment.
Maybe add tests? Lit tests for code completion (`clang/test/CodeCompletion`)
should be a good fit
Comment at: include/clang/Parse/Parser.h:2971
+ /// signature help working even when it is triggered inside a token.
+ bool CalledOverloadCompleti
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51077
___
cfe-commits mailing list
cfe-commits@lists.
ilya-biryukov added a comment.
WRT to the configuration argument, using stack size suggested by @arphaman
seems like a better option. So let's not add any extra options to clangd.
Comment at: clangd/Threading.cpp:76
+
+ if (::pthread_attr_setstacksize(&Attr, 8 * 1024 * 1024)
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D50967
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:73
+
+ void onPreambleAST(PathRef Path, ASTContext &Ctx,
+ std::shared_ptr PP) override {
hokein wrote:
> ilya-biryukov wrote:
> > hokein wrote:
> > > I think `Ctx` shou
ilya-biryukov added a comment.
Summarizing the offline discussion with @kbobyrev, @ioeric and @sammccall in
two comments.
Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:96
+ /// shouldn't apply any boosting to the consumed item.
+ virtual float boost(DocID ID) con
ilya-biryukov updated this revision to Diff 161924.
ilya-biryukov added a comment.
- Rebase onto head
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50889
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
Index: cl
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added inline comments.
Comment at: clangd/index/CanonicalIncludes.h:44
/// Maps all files matching \p RE to \p CanonicalPath
- void addRegexMapping(llvm::StringRef RE, llvm::StringRef CanonicalPath);
+ void addSuf
ilya-biryukov updated this revision to Diff 161932.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- s/addSuffixMapping/addFileSuffixMapping
- Document the intention of MaxSuffixComponents
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
File
ilya-biryukov added inline comments.
Comment at: clangd/index/Index.cpp:139
+std::sort(Occurrences.begin(), Occurrences.end(),
+ [](const SymbolOccurrence &L, const SymbolOccurrence &R) {
+return L < R;
NIT: remove the lambda? usi
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D50970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/
ilya-biryukov updated this revision to Diff 161945.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Use std::distance instead of an explicit loop
- Merge break into loop condition
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
Files:
cla
ilya-biryukov added inline comments.
Comment at: clangd/index/CanonicalIncludes.cpp:24
+ int Components = 0;
+ for (auto It = llvm::sys::path::begin(Suffix),
+End = llvm::sys::path::end(Suffix);
ioeric wrote:
> Would `int Components = begin(Suffix)
ilya-biryukov added a comment.
Sorry, missed the dependent revision adding tests to clangd at first. Having
another test in sema would still be great, to make sure we guard against
regressions if someone does not have clang-tools-extra checked out.
Repository:
rC Clang
https://reviews.llvm.
ilya-biryukov created this revision.
ilya-biryukov added reviewers: hokein, ioeric, kbobyrev, sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay.
The new mode avoids serializing and deserializing YAML.
This results in better performance and less memory usage. Reduce phase
is
ilya-biryukov added a comment.
Collecting the timings to build the index for LLVM now. Will publish when
they're ready
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51155
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
1 - 100 of 3283 matches
Mail list logo