ilya-biryukov added a comment.
Really excited about this one, this should give us decent latency improvements
when using the static index.
My main suggestion would be to put almost all of the speculating code into
`CodeComplete.cpp`.
We could merely return the request that should be used for sp
ilya-biryukov added a comment.
- New mode
./bin/global-symbol-builder -merge-on-the-fly -executor=all-TUs > /dev/null
40079.41s user 1874.40s system 5340% cpu 13:05.56 total
- Old mode
Still running, expect it to be more than 40minutes... Will update when I have
the numbers.
Repository:
ilya-biryukov added inline comments.
Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:61
+/// rely on MR use-case to work properly.
+llvm::cl::init(false));
+
ioeric wrote:
> AFAIK, this flag would basically depend on the executor bein
ilya-biryukov added a comment.
The numbers are finally there
New mode
./bin/global-symbol-builder -merge-on-the-fly -executor=all-TUs > /dev/null
40079.41s user 1874.40s system 5340% cpu 13:05.56 total
Old mode
./bin/global-symbol-builder -merge-on-the-fly=false -executor=all-TUs >
/dev
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/D51102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ilya-biryukov added a comment.
One major limitation of the current workaround is that IIRC clang can actually
call code completion callbacks, including this method, multiple times (e.g.
when completing inside a macro definition that gets expanded later in the file
or during parser recovery).
Th
ilya-biryukov added inline comments.
Comment at: clangd/index/Index.h:46
+
+inline bool operator==(const SymbolLocation::Position &L,
+ const SymbolLocation::Position &R) {
hokein wrote:
> ilya-biryukov wrote:
> > NIT: having friend decls in
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
LGTM. Many thanks!
See the NIT about avoiding the helper class too.
Comment at: clangd/Threading.cpp:88
+ llvm::llvm_execute_on_thread_async(
+ Callable{Name.str(), std::move(Action), std::move(CleanupTa
ilya-biryukov added a comment.
Some drive-by NITS.
Comment at: clang-tools-extra/clangd/index/MemIndex.cpp:109
+std::lock_guard Lock(Mutex);
+
+Bytes += Index.getMemorySize();
Why not simply `return Index.getMemorySize()` under a lock?
===
ilya-biryukov added inline comments.
Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:61
+/// rely on MR use-case to work properly.
+llvm::cl::init(false));
+
ioeric wrote:
> ilya-biryukov wrote:
> > ioeric wrote:
> > > AFAIK, this fla
ilya-biryukov updated this revision to Diff 145691.
ilya-biryukov added a comment.
- Fixed infinite loop with comments that contain doxygen commands
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/C
ilya-biryukov added inline comments.
Comment at: include/clang-c/Index.h:5237
+/**
+ * \brief FixIts that *must* be applied before inserting the text for the
+ * corresponding completion item. Completion items with non-empty fixits will
This seems too large for a
ilya-biryukov updated this revision to Diff 145883.
ilya-biryukov marked 4 inline comments as done.
ilya-biryukov added a comment.
- Renames and other comments
- Don't include brief comments in signature help either, comments there are
also handled by the code completion code now.
Repository:
ilya-biryukov added inline comments.
Comment at: clangd/CodeCompletionStrings.h:24
+/// Gets a raw documentation comment of \p Result.
+/// Returns empty string when no comment is available.
sammccall wrote:
> What does raw mean - range of the file? indentation
ilya-biryukov updated this revision to Diff 145890.
ilya-biryukov added a comment.
- Moved tests to clang
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46002
Files:
clangd/ClangdUnit.cpp
clangd/CodeComplete.cpp
Index: clangd/CodeComplete.cpp
=
ilya-biryukov created this revision.
ilya-biryukov added reviewers: bkramer, aaron.ballman, sammccall.
This change fixes lack of completions in the following case
('^'designates completion points) :
void f(^);
struct Incomplete;
Incomplete g(^);
Repository:
rC Clang
https://reviews.llv
ilya-biryukov added a comment.
In https://reviews.llvm.org/D42966#1085303, @mikhail.ramalho wrote:
> Hi,
>
> > Where do virtual files come from in the first place?
>
> From the linemarker:
I tried dumping locations in presence of line markers.
They have non-null `FileEntry` and a reasonable off
ilya-biryukov added a comment.
This LG, but we should first roll out the `additionalEdits` change.
Aren't the dependencies reversed in the dependency stack, i.e. this change
should be the last one?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46676
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM, just a few non-blocking NITs with questions.
Comment at: clangd/SourceCode.cpp:180
+ // Turn the replacements into the format specified by the Language S
ilya-biryukov added inline comments.
Comment at: clangd/index/SymbolCollector.cpp:95
+ auto FileName = SM.getFilename(findNameLoc(ND));
+ if (FileName.endswith(".proto.h") || FileName.endswith(".pb.h")) {
+auto Name = ND->getName();
NIT: reduce nesting by i
ilya-biryukov added a comment.
This change is big enough to be somewhat hard to grasp.
Maybe we could split it into two, to make it easier for review?
I.e.
- Extraction of IncludeStyle into a separate subclass.
- Moving stuff around without other refactorings.
Comment at: incl
ilya-biryukov added inline comments.
Comment at: unittests/clangd/ClangdTests.cpp:941
-TEST_F(ClangdVFSTest, InsertIncludes) {
- MockFSProvider FS;
Do we test the same thing somewhere else (e.g. code completion) in one of the
dependent changes?
Maybe it's wo
ilya-biryukov added a comment.
In https://reviews.llvm.org/D46751#1095894, @malaperle wrote:
> Can there be an option for this? This seems very library specific and could
> break other code bases. Ideally, there would be a generic mechanism for this
> kind of filtering, i.e. specify a pattern o
ilya-biryukov added a subscriber: sammccall.
ilya-biryukov added a comment.
So, the first line of the file generated by proto compiler seems to be
something like this:
// Generated by the protocol buffer compiler. DO NOT EDIT!
If we check the symbol comes from a file with this comment, there
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LG when all the dependencies are done
Comment at: unittests/clangd/ClangdTests.cpp:941
-TEST_F(ClangdVFSTest, InsertIncludes) {
- MockFSProvider FS;
ilya-biryukov added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:12645
+if (FD->isConstexpr() || FD->getReturnType()->isUndeducedType() ||
+FD->getReturnType()->isInstantiationDependentType())
return false;
rsmith wrote:
> This is a lot b
ilya-biryukov updated this revision to Diff 146326.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Simplify test code with SourceManagerForFile.
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AS
ilya-biryukov added inline comments.
Comment at: include/clang/AST/RawCommentList.h:138
+ /// the overload with ASTContext in the rest of the code.
+ std::string getFormattedText(const SourceManager &SourceMgr,
+ DiagnosticsEngine &Diags) const;
--
ilya-biryukov added a comment.
> Here :)
>
> http://www.sidefx.com/docs/hdk/_s_o_p___bone_capture_lines_8proto_8h_source.html
Didn't take along to find an example. Thanks for digging this up. That looks
like a good enough reason to not apply proto-specific filtering based solely on
the filena
ilya-biryukov added inline comments.
Comment at: lib/Format/Format.cpp:461
+
+template <> struct MappingTraits {
+ static void mapping(IO &IO, IncludeStyle::IncludeCategory &Category) {
Should we move this to `tooling::Core` too?
If we need to specialize `Mappin
ilya-biryukov created this revision.
ilya-biryukov added reviewers: sammccall, ioeric.
Herald added subscribers: jkorous, MaskRay, klimek.
We used to query the index when completing after class qualifiers,
e.g. 'ClassName::^'. We should not do that for the same reasons we
don't query the index for
ilya-biryukov added inline comments.
Comment at: unittests/clangd/CodeCompleteTests.cpp:829
+TEST(CompletionTest, NoIndexCompletionsInsideClasses) {
+ // clang-format off
+ auto Completions = completions(R"cpp(
sammccall wrote:
> Can we avoid disabling clang-fo
ilya-biryukov updated this revision to Diff 146571.
ilya-biryukov marked 5 inline comments as done.
ilya-biryukov added a comment.
- Address review comments
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46795
Files:
clangd/CodeComplete.cpp
unittests/clangd/CodeCompleteTest
ilya-biryukov added a comment.
In https://reviews.llvm.org/D41537#1097601, @yvvan wrote:
> I hope this review will be over some day :)
Sorry for keeping it that long.
FWIW, I think we keep jumping back and forth between the clang and libclang
changes here.
I should've suggested splitting the c
ilya-biryukov added inline comments.
Comment at: tools/libclang/CIndexCodeCompletion.cpp:309
+ /// before that result for the corresponding completion item.
+ std::vector> FixItsVector;
};
yvvan wrote:
> ilya-biryukov wrote:
> > Storing `vector>` here makes lo
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/D45815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
ilya-biryukov added a comment.
LG. Just a quick comment about possibly unrelated change.
Comment at: lib/Format/Format.cpp:2277
auto Replace =
-Includes.insert(trimInclude(IncludeName), IncludeName.startswith("<"));
+Includes.insert(IncludeName.trim("\"<>")
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/D46758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
ilya-biryukov added a comment.
This LG, presuming there are no semantic changes here, just moving the code
around.
Also see the nits about `IncludeStyle` that seems to be in the wrong change...
Comment at: include/clang/Tooling/Core/HeaderIncludes.h:112
+/// priorities for hea
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/Format/Format.cpp:1702
// cases where the first #include is unlikely to be the main header.
- IncludeCategoryManager Categories(Style,
ilya-biryukov updated this revision to Diff 146757.
ilya-biryukov added a comment.
- Removed the overload that accepts ASTContext
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/CommentLexer.cpp
l
ilya-biryukov added a comment.
Maybe move the tests back to this revision?
There are tests for code completion that don't depend on libindex or libclang
and use clang -cc1 directly, i.e. `tools/clang/test/CodeComplete`. This would
require adding a flag to clang and patching up `PrintingCodeCompl
ilya-biryukov updated this revision to Diff 146812.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Rebase onto head and remove \brief from the comments, it's gone upstream now
- Rename CurrentArg to ArgIndex
Repository:
rC Clang
https://reviews.llvm.org/D4600
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/D46524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ilya-biryukov updated this revision to Diff 146827.
ilya-biryukov marked 6 inline comments as done.
ilya-biryukov added a comment.
- Fix code after a change in deps (getFormattedText now needs a SourceManager
instead of an ASTContext)
- Address review comments
Repository:
rCTE Clang Tools Ext
ilya-biryukov added inline comments.
Comment at: clangd/CodeCompletionStrings.h:29
+
+/// Gets a raw documentation comment of the current active parameter
+/// of \p Result.
sammccall wrote:
> sammccall wrote:
> > ilya-biryukov wrote:
> > > ilya-biryukov wrote:
>
ilya-biryukov updated this revision to Diff 146831.
ilya-biryukov added a comment.
- Added tests that all comments are being parsed.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46002
Files:
clangd/ClangdUnit.cpp
clangd/CodeComplete.cpp
unittests/clangd/CodeCompleteTest
ilya-biryukov added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:274
WorkspaceEdit WE;
WE.changes = {{Params.textDocument.uri.uri(), Edits}};
reply(WE);
NIT: not related to this change, but maybe use `std::move(Edits)` to avo
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/D46751
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ilya-biryukov updated this revision to Diff 147060.
ilya-biryukov added a comment.
Rebase onto head, fix merge conflicts
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45999
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/CodeCompletionStrings.cpp
clangd/Cod
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: mgrang, jkorous, MaskRay, klimek.
This should, arguably, give better ranking.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46943
Files:
clangd/AST.cpp
clangd/A
ilya-biryukov added a comment.
Sorry, a few more things and we're good to go.
Comment at: include/clang/Driver/CC1Options.td:449
+def code_completion_include_fixits : Flag<["-"],
"code-completion-include-fixits">,
+ HelpText<"Include code completion results which require havi
ilya-biryukov added a comment.
A few questions regarding class members. To pinpoint some interesting cases and
agree on how we want those to behave in the long run.
How do we handle template specializations? What will the qualified names of
those instantiations be?
I.e. how do I query for `push
ilya-biryukov added inline comments.
Comment at: clangd/Quality.cpp:24
+ if (SemaCCResult.Declaration)
+AllDeclsInMainFile = allDeclsInMainFile(SemaCCResult.Declaration);
if (SemaCCResult.Availability == CXAvailability_Deprecated)
sammccall wrote:
> ioeri
ilya-biryukov updated this revision to Diff 147301.
ilya-biryukov added a comment.
- Move tests to QualityTests.cpp
- Fix findDecl() assertion on redecls of the same thing
- Fix file comment of TestTU.cpp
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46943
Files:
clangd/AST.
ilya-biryukov added inline comments.
Comment at: clangd/AST.h:32
+/// Returns true iff all redecls of \p D are in the main file.
+bool allDeclsInMainFile(const Decl *D);
sammccall wrote:
> Do you expect this to be reused?
> If so, unit test? Otherwise this seem
ilya-biryukov added inline comments.
Comment at: clangd/Quality.cpp:24
+ if (SemaCCResult.Declaration)
+AllDeclsInMainFile = allDeclsInMainFile(SemaCCResult.Declaration);
if (SemaCCResult.Availability == CXAvailability_Deprecated)
ioeric wrote:
> ioeric w
ilya-biryukov added a comment.
In https://reviews.llvm.org/D44954#1103664, @malaperle wrote:
> It's probably better to consider this in a future patch. Maybe something like
> the first suggestion: vector::push_back and match both. Otherwise, I would
> think it might be a bit too verbose to have
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: jkorous, MaskRay, ioeric, javed.absar, klimek.
After this commit, clangd will only keep the last 3 accessed ASTs in
memory. Preambles for each of the opened files are still kept in
memory to m
ilya-biryukov added a comment.
Another alternative that I've considered was evicting the ASTs from memory
after a certain period of time, e.g. after 30 seconds of inactivity for some
file. This might be simpler and also cover the use-case of speeding up multiple
code navigation requests (findDe
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, klimek.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47065
Files:
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
Index: clangd/global
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, klimek.
Now that the clients who relied on stats for files from preamble are
gone.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47066
Files:
cl
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a minor naming suggestion.
Comment at: include/clang/Format/Format.h:20
#include "clang/Tooling/Core/Replacement.h"
+#include "clang/Tooling/Inclusio
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:457
Result.StartsNestedNameSpecifier = false;
+ // FIXME: the same result can be added multiple times as the callback can
+ // be called more than once. We may want to deduplicate identical
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:457
Result.StartsNestedNameSpecifier = false;
+ // FIXME: the same result can be added multiple times as the callback can
+ // be called more than once. We may want to deduplicate identical
ilya-biryukov added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:4109
+ if (CodeCompleter->includeFixIts()) {
+const SourceRange OpRange(OpLoc, OpLoc.getLocWithOffset(IsArrow ? 2 : 1));
+CompletionSucceded =
yvvan wrote:
> ilya-biryukov wro
ilya-biryukov added a comment.
In https://reviews.llvm.org/D47065#1104730, @ioeric wrote:
> Should we also change the behavior in dynamic index?
Dynamic index already uses whatever AST provides (which is `ParseAllComments =
true` since https://reviews.llvm.org/D46002)
Repository:
rCTE Clan
ilya-biryukov updated this revision to Diff 148006.
ilya-biryukov added a comment.
Herald added a subscriber: mgorny.
- Move helpers tha switch header and source into separate files.
- Also uprank items coming from the matching headers
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.o
ilya-biryukov added a comment.
I've added an initial version of testing for the matching header and wanted to
get feedback before proceeding further with tests and other changes.
A few things that bug me so far:
- We need to match headers of items from the index, not only from the Sema
results
ilya-biryukov added a subscriber: sammccall.
ilya-biryukov added a comment.
I'm not sure if we have tests for that, but I remember that we kept the
enumerators in the outer scope so that completion could find them..
Am I right that this patch will change the behavior and we won't get
enumerators
ilya-biryukov added a comment.
In https://reviews.llvm.org/D46943#1109199, @ioeric wrote:
> > - Symbols store their paths as URIs ⇒ we need to parse them in order to
> > apply heuristics. We could avoid that by writing a version of
> > header-matching that also works on URIs, but that would mea
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, javed.absar, klimek.
This is more efficient and avoids data races when reading files that
come from the preamble. The staleness can occur when reading a file
from disk
ilya-biryukov added a comment.
In https://reviews.llvm.org/D47272#1109909, @malaperle wrote:
> > We do not to rely on symbols from the main file anyway, since any info hat
> > those provide can always be taken from the AST.
>
> I'll be adding those soon for workspace symbols... And also for docu
ilya-biryukov added a comment.
@malaperle, a slight offtopic. I was wondering which completion options do you
use for clangd? Defaults?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47272
___
cfe-commits mailing list
cfe-commits@l
ilya-biryukov updated this revision to Diff 148262.
ilya-biryukov added a comment.
- Added forgotten renames
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47272
Files:
clangd/ClangdServer.cpp
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cpp
clangd/TUS
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: jkorous, MaskRay, ioeric, klimek.
To fix a crash in code completion that occurrs when reading doc
comments from files that were updated after the preamble was
computed. In that case, the files
ilya-biryukov updated this revision to Diff 148355.
ilya-biryukov added a comment.
- Reimplemented LRU cache with shared_ptr and weak_ptr.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cpp
clangd
ilya-biryukov added inline comments.
Comment at: clangd/ClangdUnit.h:132
-/// Manages resources, required by clangd. Allows to rebuild file with new
-/// contents, and provides AST and Preamble for it.
-class CppFile {
+/// A helper class that handles building preambles and AST
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/D47256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ilya-biryukov added a comment.
After an offline chat: we decided to boost sema results that have **any** decls
in the main file. Even though it introduces some unwanted inconsistencies in
some cases (e.g. see the comment), most of us agree that's a very simple
implementation that does boost use
ilya-biryukov updated this revision to Diff 148381.
ilya-biryukov added a comment.
- Simplify the change by boosting any Decls that have a redecl in the current
file
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46943
Files:
clangd/Quality.cpp
clangd/Quality.h
unittests
ilya-biryukov added a comment.
> But I feel it's a bit odd that completion and workspace symbols would be
> inconsistent.
It does not seem that odd to me. Completion is something that should follow the
language rules more closely, i.e. we don't want to deviate from sema
completions too much. W
ilya-biryukov added a comment.
I have only a few nits left, otherwise looks good. Thanks for making this
change! Really excited for it to get in finally!
Comment at: include/clang/Driver/CC1Options.td:449
+def code_completion_with_fixits : Flag<["-"], "code-completion-with-fix
ilya-biryukov added a comment.
In https://reviews.llvm.org/D47272#1110958, @ioeric wrote:
> Would it be possible to add some integration tests for file index plus
> preamble?
Sure, will do
Comment at: clangd/index/FileIndex.cpp:37
+ std::vector TopLevelDecls(
+ AST.ge
ilya-biryukov updated this revision to Diff 148413.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Invert flag, remove the default.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47274
Files:
clangd/CodeComplete.cpp
clangd/CodeCompletionStr
ilya-biryukov added inline comments.
Comment at: clangd/CodeCompletionStrings.h:46
const CodeCompleteConsumer::OverloadCandidate &Result,
- unsigned ArgIndex);
+ unsigned ArgIndex, bool NoCommentsFromHeaders = tr
ilya-biryukov added a comment.
Added the test.
Comment at: clangd/index/FileIndex.cpp:37
+ std::vector TopLevelDecls(
+ AST.getTranslationUnitDecl()->decls().begin(),
+ AST.getTranslationUnitDecl()->decls().end());
ioeric wrote:
> ilya-biryukov wrote
ilya-biryukov updated this revision to Diff 148421.
ilya-biryukov added a comment.
- Added a test for preamble rebuilds.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47272
Files:
clangd/ClangdServer.cpp
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cpp
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, mehdi_amini, klimek.
They cause lots of deserialization and are not actually used.
The ParsedAST accessor that previously returned those was renamed from
getTopLevelDe
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Thanks for addressing the NITs. LGTM!
https://reviews.llvm.org/D41537
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:
ilya-biryukov updated this revision to Diff 148599.
ilya-biryukov added a comment.
- Rebase, fix merge conflicts
- Simpler implemenataion of the Cache
- s/IdleASTs/ASTCache
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
ilya-biryukov added a comment.
I have addressed the comments regarding the cache implementation. ASTBuilder
ones are still pending, but I would appreciate the feedback on how
`TUScheduler.cpp` looks like.
Comment at: clangd/ClangdUnit.h:132
-/// Manages resources, required
ilya-biryukov added inline comments.
Comment at: clangd/ClangdUnit.h:81
ASTContext &getASTContext();
const ASTContext &getASTContext() const;
ioeric wrote:
> IIUC, `ASTContext` in a `ParsedAST` may not contain information from
> preambles and thus may gi
ilya-biryukov updated this revision to Diff 148602.
ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.
- Rename the field in addition to the getter
- Address review comments
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47331
Files:
clangd/ClangdU
ilya-biryukov updated this revision to Diff 148605.
ilya-biryukov added a comment.
- Rewrote findDecl, it will deserialize decls if needed now
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47331
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/XRefs.cpp
unittest
ilya-biryukov added a comment.
So to keep completion working, maybe we can give add enumerators with full
qualification and have a flag that determines whether the last component of the
qualifier can be ignored?
This would give a simple implementation path for now, and will add a semantic
signa
ilya-biryukov updated this revision to Diff 148820.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Address review comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUSch
ilya-biryukov added inline comments.
Comment at: clangd/TUScheduler.cpp:71
+
+ /// Update the function used to compute the value.
+ void update(std::function()> ComputeF);
sammccall wrote:
> ilya-biryukov wrote:
> > sammccall wrote:
> > > I think I understand t
ilya-biryukov updated this revision to Diff 148822.
ilya-biryukov added a comment.
- Remove ASTBuilder, make everything a helper function
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cpp
clangd/
ilya-biryukov updated this revision to Diff 148824.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- s/Params/Policy
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cp
101 - 200 of 3283 matches
Mail list logo