[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-10-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226046. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69298/new/ https://reviews.llvm.org/D69298 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp clang-

[PATCH] D69328: [clangd] Propogate context in TUScheduler::run

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D69328 Files: clang-too

[PATCH] D69328: [clangd] Propogate context in TUScheduler::run

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226122. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69328/new/ https://reviews.llvm.org/D69328 Files: clang-tools-ex

[PATCH] D69338: [clangd] Collect name references in the index.

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:268 - // decide to implement renaming with index support. - if ((Roles & static_cast(index::SymbolRole::Nam

[PATCH] D69328: [clangd] Propogate context in TUScheduler::run

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10c8dbcb840c: [clangd] Propogate context in TUScheduler::run (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69328/new/ https://review

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226134. kadircet marked an inline comment as done. kadircet added a comment. - Address comments - Handle template parameters when copying function and add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D692

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 7 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1574 + ExtraFiles["Test.cpp"] = ""; + EXPECT_EQ(apply("void fo^o() { return; }", &EditedFiles), "void foo() ;"); + EXPECT_THAT(EditedFiles,

[PATCH] D69329: [clangd] abort if shutdown takes more than a minute.

2019-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Sorry I somehow missed the fact that I was a reviewer :D LGTM Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:219 + // destroyed first, to ensure worker threads

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226209. kadircet marked 20 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D66647 Files: clang-tools-e

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:79 + Token CurToken; + while (!CurToken.is(tok::semi)) { +if (RawLexer.LexFromRawLexer(CurToken)) ilya-biryukov wrote: > What are the tokens we expect to s

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226230. kadircet marked 15 inline comments as done. kadircet added a comment. - Improve macro handling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D66647 Files: clang-t

[PATCH] D69382: [clangd] Do not insert parentheses when completing a using declaration

2019-10-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:463 + // Check all-scopes completions too. + Opts.AllScopes = true; + Results = completions(R"cpp( I believe `AllScopes` and this feature is orthogonal what ex

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:334 + +const tooling::Replacement SemiColonToFuncBody(SM, *SemiColon, 1, + *QualifiedBody); ilya-biryukov w

[PATCH] D69266: [clangd] Define out-of-line availability checks

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 6 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1548 + + ExtraFiles["Test.cpp"] = ""; + // Basic check for function body and signature. hokein wrote: > Is this needed? It i

[PATCH] D69266: [clangd] Define out-of-line availability checks

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226381. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69266/new/ https://reviews.llvm.org/D69266 Files: clang-tools-ex

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226388. kadircet marked 2 inline comments as done. kadircet added a comment. - s/SemiColon/Semicolon/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D66647 Files: clang-to

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226389. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp clang-t

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG74d39a42f109: [clangd] DefineInline action availability checks (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D65433?vs=222158&id=226394#toc Repository: rG LLVM Github Mono

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdfd6374c784f: [clangd] DefineInline action apply logic with fully qualified names (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd62e3ed3f4b9: [clangd] Implement GetEligiblePoints (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68024/new/ https://reviews.llvm.org

[PATCH] D69165: [clangd] Store Index in Tweak::Selection

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8aa84ad37db7: [clangd] Store Index in Tweak::Selection (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D69165?vs=225871&id=226399#toc Repository: rG LLVM Github Monorepo CH

[PATCH] D69382: [clangd] Do not insert parentheses when completing a using declaration

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1466 Output.Completions.back().Score = C.second; Output.Completions.back().CompletionTokenRange = ReplacedRange; } why not handle `SnippetSuffix` in here ? i

[PATCH] D69427: Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cpp

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69427/new/ https://reviews.llvm.org/D69427 _

[PATCH] D69427: Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cpp

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce1e249a688d: Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cpp (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69427/

[PATCH] D69382: [clangd] Do not insert parentheses when completing a using declaration

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:483 bool EnableFunctionArgSnippets; + bool CompleteArgumentList; }; maybe rather use `GenerateSnippets`? Since this doesn't generate completions for the snippets, but rath

[PATCH] D69382: [clangd] Do not insert parentheses when completing a using declaration

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. oops, thought I've LGTM'd it on previous cycle :D Comment at: clang-tools-extra/clangd/CodeComplete.cpp:483 bool EnableFunctionArgSnippets; + bool CompleteArgumentLis

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226517. kadircet marked 4 inline comments as done. kadircet added a comment. - Use findExplicitReferences for decl traversals. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226619. kadircet added a comment. - Don't rename if parameters have the same name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: clang-tools-extra/clangd/ref

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226655. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: clang-tools-ex

[PATCH] D69511: [clangd] Do not report anonymous entities in findExplicitReferences

2019-10-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:453 + // and the clients are not prepared to handle that. + if (ND->getDeclName().isIdentifier() && + !ND->getDeclName().getAsIdentifierInfo()) i believe this w

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226849. kadircet added a comment. - Handle unnamed parameters explicitly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: clang-tools-extra/clangd/refactor/twe

[PATCH] D69543: [WIP][clangd] Add a tweak refactoring to wrap Objective-C string literals in `NSLocalizedString` macros

2019-10-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:127 +TEST_F(ObjCLocalizeStringLiteralTest, Test) { + ExtraArgs.push_back("-x=objective-c"); + Context = Expression; make sure this is rebased on top of http://github.

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226868. kadircet marked 3 inline comments as done. kadircet added a comment. - Handle macros in parameter names. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files:

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1517 +template +void foo(PARAM, TYPE b, TYPE c, TYPE d = BODY(x)){} + ilya-biryukov wrote: > We fail to rename the parameter in that case, right? > Should the a

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226909. kadircet marked 2 inline comments as done. kadircet added a comment. - Use Lexer::makeFileCharRange Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: cl

[PATCH] D80212: [clangd] Handle references for patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265182. kadircet added a comment. - Polish Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80212/new/ https://reviews.llvm.org/D80212 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/clangd/unitt

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265181. kadircet added a comment. - Polish Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265187. kadircet marked an inline comment as done. kadircet added a comment. - Rename buildPreamble to preamble Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files:

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265195. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265193. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files: clang-tools-extra/clangd/unittests/PreambleTests.cpp clang-tools-

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265194. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992 Files: clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/un

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. Depends on D80198 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D802

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:248 + ReqCV.wait(Lock, [this] { +return !NextReq || NextReq->WantDiags != WantDiagnostics::Yes; + }); This is mostly

[PATCH] D80296: [clangd] Don't traverse the AST within uninteresting files during indexing

2020-05-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/unittests/IndexActionTests.cpp:22 using ::testing::ElementsAre; +using testing::EndsWith; using ::testing::Not; ---

[PATCH] D80472: [clangd] Add access specifier information to hover contents

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks for taking a look at this, this looks great! mostly nits, but the one in tests is important and annoying (it might require you to update some existing cases) Comment at: clang-tools-extra/clangd/Hover.cpp:680 +StringRef getAccessString(Acces

[PATCH] D80472: [clangd] Add access specifier information to hover contents

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added a comment. This revision is now accepted and ready to land. thanks! LGTM with some minor comments. let me know if you don't have commit access so that i can land this for you. Comment at

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 265995. kadircet marked 5 inline comments as done. kadircet added a comment. - Assert on patch contents, using regexes for main file match. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://revi

[PATCH] D80521: [clangd] Make use of SourceOrder to find first initializer in DefineOutline

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Constructors can have implicit initializers, this was crashing define outline. Make sure we find the fi

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266047. kadircet marked 3 inline comments as done. kadircet added a comment. Instead of re-lexing at use time, put macro identifier on correct column while patching and make use of presumed locations at use time. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D80296: [clangd] Don't traverse the AST within uninteresting files during indexing

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang/lib/Index/IndexingAction.cpp:142 +ShouldSkipFunctionBody = +[ShouldTraverseDecl(Opts.ShouldTraverseDecl)](const Decl *D) { + return !ShouldTraverseDecl(D); --

[PATCH] D80521: [clangd] Make use of SourceOrder to find first initializer in DefineOutline

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeeedbd033612: [clangd] Make use of SourceOrder to find first initializer in DefineOutline (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D80521?vs=266027&id=266106#toc Reposi

[PATCH] D79426: [clangd] Change PreambleOnlyAction with content truncation

2020-05-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG34e39eb2adc2: [clangd] Change PreambleOnlyAction with content truncation (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D79426?vs=262132&id=266107#toc Repository: rG LLVM G

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266111. kadircet marked 10 inline comments as done. kadircet added a comment. - Extract preamble-patch location translation to a helper: - Migrate usage in include collector - Make preamble patch header name part of the check. - Handle macro ids in spellD

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Preamble.cpp:133 + auto DecompLoc = SM.getDecomposedLoc(DirectiveRange.getBegin()); + DirectiveLine = SM.getLineNumber(DecompLoc.first, DecompLoc.second); + auto SpaceBefore = SM.getColumnNumber(DecompLoc.fir

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266128. kadircet marked 4 inline comments as done. kadircet added a comment. - Add tests for preamble-patch translation logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D

[PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266174. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77644/new/ https://reviews.llvm.org/D77644 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/clang

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266187. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266186. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992 Files: clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/Pr

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266202. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files: clang-tools-extra/clangd/unittests/PreambleTests.cpp clang-tools-

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266201. kadircet edited the summary of this revision. kadircet added a comment. - Rebase and update comments on block until idle. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80293/new/ https://reviews.llvm.o

[PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266215. kadircet added a comment. - Fix windows build bots in the face of `#import` directives Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77644/new/ https://reviews.llvm.org/D77644 Files: clang-tools-ext

[PATCH] D80472: [clangd] Add access specifier information to hover contents

2020-05-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks a lot, looks like you've only uploaded the diff for your latest changes(e.g. changes to clang-doc are gone). you need to squash them and upload a single diff based at master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D80472: [clangd] Add access specifier information to hover contents

2020-05-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6407aa9d2e0e: [clangd] Add access specifier information to hover contents (authored by danielmartin, committed by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266638. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992 Files: clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/Pr

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266637. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org/D79930 Files: clang-tools-extra/clangd/unittests/PreambleTests.cpp clang-tools-

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266639. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews.llvm.org/D80198 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extra/clangd/Hov

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 22 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:724 std::move(Req.WantDiags)); +// Set it after notifying ASTPeer about the preamble to prevent any races. +BuiltFi

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 266814. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80293/new/ https://reviews.llvm.org/D80293 Files: clang-tools-ex

[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.

2020-05-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. mostly LG, sorry for not noticing regularfile check(or maybe forgetting a discussion ...) at previous revision Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:108 +// (We have some false negatives if PP recovered e.g. -> "foo") +if (Fi

[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.

2020-05-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Let's build more preambles ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77942/new/ https://reviews.llvm.org/D77942 _

[PATCH] D75414: [clangd] Resolve driver symlinks, and look up unknown relative drivers in PATH.

2020-05-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/support/Threading.h:134 +// Memoize is a cache to store and reuse computation results based on a key. +// nit:

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 267156. kadircet added a comment. - Move notification from PreambleThread to ASTWorker Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80293/new/ https://reviews.llvm.org/D80293 Files: clang-tools-extra/clang

[PATCH] D80784: [clangd][NFC] Explode ReceivedPreamble into a CV

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. Instead of a notification, we make use of a CV and store the boolean on LatestPreamble by

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 267157. kadircet marked 3 inline comments as done. kadircet added a comment. - Add comment explaining why we block on ASTWorker::update rather than consumers of a preamble Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D79930: [clangd] Add buildPreamble to TestTU

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG478f6fb20016: [clangd] Add buildPreamble to TestTU (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79930/new/ https://reviews.llvm.org

[PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb742eaa32121: [clangd] Handle additional includes while parsing ASTs (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77644/new/ https:

[PATCH] D80198: [clangd] locateMacroAt handles patched macros

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG538c2753f3ec: [clangd] locateMacroAt handles patched macros (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80198/new/ https://reviews

[PATCH] D79992: [clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfcde3d5b04b6: [clangd] Patch PP directives to use stale preambles while building ASTs (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f4ba66ecc87: [clangd] Run PreambleThread in async mode behind a flag (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80293/new/ https

[PATCH] D80784: [clangd][NFC] Explode ReceivedPreamble into a CV

2020-05-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:661 +std::unique_lock Lock(Mutex); +RequestsCV.wait(Lock, [this] { + // Block until we reiceve a preamble request, unless a preamble alread

[PATCH] D80900: [clangd] Use different FS in PreambleThread

2020-05-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. As vfs::FileSystem is not threadsafe, we've introduced a data race when PreambleThread sta

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, jkorous. Herald added subscribers: cfe-commits, usaxena95, arphaman, dexonsmith, MaskRay, ilya-biryukov. Herald added a project: clang. ReplayPreamble was just grabbing the reference of IncludeStructure passed to it and then rep

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 267848. kadircet marked an inline comment as done. kadircet added a comment. - Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80988/new/ https://reviews.llvm.org/D80988 Files: clang-tools-ext

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8506877c87aa: [clangd] Copy existing includes in ReplayPreamble (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80988/new/ https://rev

[PATCH] D80900: [clangd] Use different FS in PreambleThread

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D80900#2066327 , @sammccall wrote: > TL;DR: I think there are three viable paths that we should consider: > A) minimal change: put the FSProvider in ParseInputs > B) this patch, but with more documentation and safety > C) fi

[PATCH] D81069: [clangd] Don't build diagnostics when preparing AST for a normal action.

2020-06-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:369 + Inputs.Index && !BuildDir.getError()) { auto Style = getFormatStyleForFile(Filename, Inputs.Contents, VFS.get()); auto Inserter = std::make_shared( while here,

[PATCH] D83934: [clangd] Always retrieve ProjectInfo from Base in OverlayCDB

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Clangd is returning current working directory for overriden commands. This can cause inconsistencies be

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang/lib/AST/StmtPrinter.cpp:2014 + if (D->getInitStyle() == VarDecl::CallInit) { +if (!isa(D->getInit())) { + Pre = "(";

[PATCH] D83934: [clangd] Always retrieve ProjectInfo from Base in OverlayCDB

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 278421. kadircet added a comment. - Split comments between implementation and header, and reword. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83934/new/ https://reviews.llvm.org/D83934 Files: clang-tools-

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. do you have commit access? if not I am happy to land this for you. After having some commits done on your behalf, you can apply for commit access as described in https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Repository: rG LLVM Github Monorepo

[PATCH] D83934: [clangd] Always retrieve ProjectInfo from Base in OverlayCDB

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG46c921003c2c: [clangd] Always retrieve ProjectInfo from Base in OverlayCDB (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83934/new/

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa130cf8ae8ab: [clang] Fix printing of lambdas with capture expressions (authored by walrus, committed by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D83508: [clangd][Hover] Don't use Decl if it is not related with tokens under cursor.

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D83508#2155322 , @sammccall wrote: > Yeah that makes sense, I guess it just says nothing is selected in that case? > Selecting the `while` is probably marginally better for that exact case, but > selecting nothing seems fine

[PATCH] D84012: [clangd] Exclude preprocessed-to-nothing tokens from selection

2020-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang-tools-extra/clangd/Selection.cpp:228 + Buf.expansionsAffecting(Sel)) { + if (X.Expanded.empty()) { +for (const syntax

[PATCH] D84009: [Syntax] expose API for expansions overlapping a spelled token range.

2020-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, mostly LG with a comment about some edge case. just wanna know what you think. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:281 + std::vector + expansionsAffecting(llvm::ArrayRef Spelled) const; this sounds more

[PATCH] D84009: [Syntax] expose API for expansions overlapping a spelled token range.

2020-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, LGTM! (and loved the choice of `overlapping`) Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:431 +std::vector +TokenBuffer::expansionsAffecting(llvm::ArrayRef Sp

[PATCH] D83822: [clangd] Support config over LSP.

2020-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1220 CDB->setCompileCommand(File, std::move(New)); ModifiedFiles.insert(File); } sammccall wrote: > kadircet wrote: > > nit: maybe just set `ReparseAllFile

[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy

2020-07-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. ah embarrassing :/ thanks for catching this! It should've been obvious from the fact that there's a "FilePath" and a "TUPath" going on .. Comment at: clang-tools-extra/clangd/XRefs.cpp:1191 + SourceLocation EndLoc = SM.getSpellingLoc(SM.getFileLoc(ND

[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy

2020-07-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, just some improvements to the testing. also please let me know if I should land this for you. Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp

[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy

2020-07-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp:533 + + Annotations HeaderInPreambleAnnotations(R"cpp( +struct Parent { ArcsinX wrote: > kadircet wrote: > > this doesn't need to be an `Annotation` and sorry f

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