[PATCH] D61126: [clangd] Also perform merging for symbol definitions

2019-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. clangd currently prefers declarations from codegen files. This patch implements that behavior for definition

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added a comment. It has been a long time since I've proposed that change and even I forgot some of the high level details. Therefore, I wanted to sum up the state again so that we can decide on how to move forward. Currently we have two

[PATCH] D61126: [clangd] Also perform merging for symbol definitions

2019-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 196654. kadircet added a comment. - Get rid of debug comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61126/new/ https://reviews.llvm.org/D61126 Files: clang-tools-extra/clangd/XRefs.cpp

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-04-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Ping Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60819: [clangd] Strip the ' [some-check-name]' suffix from clang-tidy diagnostics. The check name is reported in Diagnostic.code.

2019-04-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, we might need to make sure clients that do not show "code" field become aware of this before LLVM9 releases Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D60822: [clangd] Use shorter, more recognizable codes for diagnostics.

2019-04-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. I agree that these are more useful. What about also adding "-W" in front of warning flags to make them more explicit and stand out from "non-flag" error names? Repository: rCTE Clang

[PATCH] D60995: [clang][HeaderSearch] Make sure there are no backslashes in suggestedPath

2019-04-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 196392. kadircet added a comment. - Update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60995/new/ https://reviews.llvm.org/D60995 Files: clang/include/clang/Lex/HeaderSearch.h

[PATCH] D60995: [clang][HeaderSearch] Make sure there are no backslashes in suggestedPath

2019-04-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 196393. kadircet added a comment. - Update comments to focus on forward slashes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60995/new/ https://reviews.llvm.org/D60995 Files:

[PATCH] D60995: [clang][HeaderSearch] Make sure there are no backslashes in suggestedPath

2019-04-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359075: [clang][HeaderSearch] Make sure there are no backslashes in suggestedPath (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D60873: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

2019-04-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359078: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-26 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: unittests/clangd/SourceCodeTests.cpp:325 +TEST(SourceCodeTests, VisibleNamespaces) { + std::vector>> Cases = { sammccall

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-04-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 196822. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments - Drop include stack Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-04-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Diagnostics.cpp:78 +// offsets when displaying that information to users. +Position toOneBased(Position P) { + ++P.line; ilya-biryukov wrote: > Could we avoid introducing a function that breaks the invariant of

[PATCH] D64789: [clangd] Handle windows line endings in QueryDriver

2019-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. fixes second case of https://github.com/clangd/clangd/issues/93 Repository: rG LLVM Github Monorepo

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:323 while(a < ^1) -^a++; +[[a++]]; // do while SureYeaah wrote: > kadircet wrote: > > I thought extractor didn't handle this case(missing

[PATCH] D58710: Added more detailed documentation for clangd

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/trunk/docs/clangd/Installation.rst:325 + + $ ln -s ~/myproject/compile_commands.json ~/myproject-build/ + thakis wrote: > Isn't the order of the arguments the wrong way round here? yeah that seems to

[PATCH] D64745: [clangd] BackgroundIndex stores shards to the closest project

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Changes persistance logic to store shards at the directory of closest CDB. Previously we were storing all shards

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:299 // return statement return ^1; } SureYeaah wrote: > kadircet wrote: > > left out this one ? > Since that's an IntegerLiteral, this patch doesn't

[PATCH] D64718: [clangd] Triggering indexing on each translation unit with an error

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Background indexing triggers indexing only on the first TU that includes a stale dependency. This patch extends

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:83 static bool isExtractableExpr(const clang::Expr *Expr) { if (Expr) { // FIXME: check if we need to cover any other types nit: Could you reduce

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:302 void f() { - int a = 5 + [[4 ^* ^xyz^()]]; + int a = 5 + [[4 * [[xyz(); // multivariable initialization kadircet wrote: > how come these

[PATCH] D63194: [clangd] Link and initialize target infos

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet closed this revision. kadircet added a comment. Landed as rL364387 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D63194

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364389: [clangd] Enable extraction of system includes from custom toolchains (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63755: [clang][Tooling] Infer target and mode from argv[0] when using JSONCompilationDatabase

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364386: [clang][Tooling] Infer target and mode from argv[0] when using… (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63194: [clangd] Link and initialize target infos

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 206598. kadircet marked an inline comment as done. kadircet added a comment. - revert leftover change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D63194 Files:

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207489. kadircet added a comment. - Store Cmdline itself instead of hash Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ https://reviews.llvm.org/D64018 Files:

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364904: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: clang. Herald added a subscriber: cfe-commits. kadircet added a child revision: D64018: [clangd] Store hash of command line in index shards.. Repository: rG LLVM Github Monorepo

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207497. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 Files:

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D64018#1566085 , @sammccall wrote: > This makes sense but is hard to debug - is there a reason we don't just store > (the relevant parts of) the actual compile command? Size? Yes I had the size in mind, also didn't see any

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207484. kadircet marked 2 inline comments as done. kadircet added a comment. - Update fixme to mention error case in addition to the missing files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207578. kadircet marked 3 inline comments as done. kadircet added a comment. - Use an InternedCompileCommand struct rather than a pack of StringRefs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/

[PATCH] D65486: [clangd] Ignore semicolons, whitespace, and comments in SelectionTree.

2019-07-31 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 for the comments, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65486/new/ https://reviews.llvm.org/D65486

[PATCH] D65526: [Clangd] Initial prototype version of ExtractFunction

2019-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:68 + bool hasOnlyRootStmtChildren(); + // We only support extraction of RootStmts. A RootStmt as a statement that is + // fully selected including all of it's children.

[PATCH] D64718: [clangd] Triggering indexing on each translation unit with an error

2019-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. this requires keeping an inverted dependency graph, which can be quite expensive memory-wise. In a project like chromium there are ~40k translation units, and it is safe to assume there are ~1k core headers just coming from

[PATCH] D66226: [clangd] Skip function bodies inside processed files while indexing

2019-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. This looks great, thanks! Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:745 +bool SymbolCollector::shouldProcessFile(FileID FID) { + assert(ASTCtx); we already have `shouldIndexFile` as an anonymous function inside

[PATCH] D66226: [clangd] Skip function bodies inside processed files while indexing

2019-08-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/index/IndexAction.cpp:194 CI.getDiagnostics().setIgnoreAllWarnings(true); +/// Instruct the parser to ask our

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks! This looks really useful when we can't build an AST due to unknown compiler commands, but I am not sure about how useful it is to surface command-line parsing errors once we are able to build an AST. Because people most likely won't care about these errors once

[PATCH] D66751: [clangd] Add targetDecl(), which determines what declaration an AST node refers to.

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I agree with Ilya's concerns on SourceLocations, even though most of the time user will have the source locations available in the dyntyped node, they might need some traversals to fetch the exact range especially in cases of nested name specifiers. It would be nice

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D66759#1646599 , @ilya-biryukov wrote: > How common is this? Do we have any particular examples? Well, I don't have any data to prove, but my experience has been so far; most of the people don't touch Makefiles apart from

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:465 +Diags.insert(Diags.end(), Preamble->Diags.begin(), Preamble->Diags.end()); + // Finally, add diagnostics coming from the AST. + { ilya-biryukov wrote: > kadircet

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66759/new/ https://reviews.llvm.org/D66759

[PATCH] D66751: [clangd] Add targetDecl(), which determines what declaration an AST node refers to.

2019-08-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. > Concretely, can you give an example of which node and what you'd want it to > point to? If it's just the single unqualified-name token, I agree and would > like to add it (as a separate

[PATCH] D67092: [clangd] Update clangd-vscode docs to be more user-focused.

2019-09-03 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 for working on this! Comment at: clang-tools-extra/clangd/clients/clangd-vscode/README.md:5 -## Usage + - code completion + - compile errors and warnings

[PATCH] D67092: [clangd] Update clangd-vscode docs to be more user-focused.

2019-09-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/README.md:95 + - use raw strings + - rerame (bound to ``, rather than a contextual code action) + s/rerame/rename Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D67092: [clangd] Update clangd-vscode docs to be more user-focused.

2019-09-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/README.md:9 + - include management + - code formatting sammccall wrote: > kadircet wrote: > > what about code-actions(and also some screenshots) > Added a section for

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 217820. kadircet marked an inline comment as done. kadircet added a comment. - Get rid off compatibility check for files that are not open in the editor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 14 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:601 + llvm::inconvertibleErrorCode(), + "File contents differ on disk for %s, please save", FilePath.data()); +}

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 217803. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66637/new/ https://reviews.llvm.org/D66637 Files:

[PATCH] D66937: [clangd] Fix the stale documentation about background indexing.

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a subscriber: sammccall. kadircet added a comment. Thanks for updating this! Pinging @sammccall since he is also working on writing some release docs, might be helpful to bring this to your attention. Comment at:

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 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/refactor/tweaks/ExtractFunction.cpp:165 +else + SR.setEnd(ChildFileRange->getEnd()); + } SureYeaah wrote: > kadircet wrote: > > I suppose

[PATCH] D66943: [clangd][NFC] Update background-index command line description

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: hokein, sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We didn't change this in D64019 just in case we revert it back.

[PATCH] D66943: [clangd][NFC] Update background-index command line description

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370367: [clangd][NFC] Update background-index command line description (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 217806. kadircet added a comment. - Handle formatting error in ClangdServer rather than just printing it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66637/new/ https://reviews.llvm.org/D66637 Files:

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:29 +// - Always passed by l-value reference +// - No return +// - Cannot move declarations before extracting did you mean no return *type* ?

[PATCH] D66723: [clangd] Add a distinct highlighting for local variables

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:229 +if (const VarDecl *VD = dyn_cast(D)) { + if (VD->isLocalVarDecl()) { +addToken(Loc, HighlightingKind::LocalVariable); nit: `addToken(Loc,

[PATCH] D66740: [clangd] Add docs for configuration knobs in clangd

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3aeed0fd5ad5: [clangd] Add docs for configuration knobs in clangd (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66740/new/

[PATCH] D66740: [clangd] Add docs for configuration knobs in clangd

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This is a first step in documenting different configuration knobs we have in clangd. Repository: rG LLVM

[PATCH] D66740: [clangd] Add docs for configuration knobs in clangd

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 217154. kadircet marked 6 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66740/new/ https://reviews.llvm.org/D66740 Files:

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. First patch for propogating multifile changes from tweak outputs to LSP WorkspaceEdits. Uses FS to convert

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

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 216815. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews.llvm.org/D65433 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 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/ClangdLSPServer.cpp:644 + assert(It.second.Edits && "TextEdits hasn't been generated?"); + if (auto Draft = DraftMgr.getDraft(It.first())) { +

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

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Herald added a project: clang. kadircet added a parent revision: D65433: [clangd] DefineInline action availability checks. Initial version of

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 216823. kadircet marked 8 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66637/new/ https://reviews.llvm.org/D66637 Files:

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 13 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:414 + if (llvm::Error Err = reformatEdit(E, Style)) { +llvm::handleAllErrors(std::move(Err), [&](llvm::ErrorInfoBase ) { +

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 218637. 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/D66637/new/ https://reviews.llvm.org/D66637 Files:

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

2019-09-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 218936. kadircet marked 4 inline comments as done. kadircet added a comment. - Rebase and address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews.llvm.org/D65433 Files:

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:414 + if (llvm::Error Err = reformatEdit(E, Style)) { +llvm::handleAllErrors(std::move(Err), [&](llvm::ErrorInfoBase ) { + elog("Failed to format {0}: {1}", It.first(),

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 219324. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66637/new/ https://reviews.llvm.org/D66637 Files:

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371392: [clangd] Support multifile edits as output of Tweaks (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D67651: [clangd] No ExtractFunction on empty selections.

2019-09-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. this one is actually specific to vardecl's and has a pending fix in D66872 I would rather wait for it to land, instead of adding another branch. WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added a comment. In D65433#1661865 , @arphaman wrote: > When fully implemented, will define inline tweak work with C++ methods in > classes as well? Yes you can see an example of it in the tests

[PATCH] D67213: [clang-tidy] Fix definitions in headers check to respect qualifiers

2019-09-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371022: [clang-tidy] Fix definitions in headers check to respect qualifiers (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 218878. kadircet marked 2 inline comments as done. kadircet added a comment. - Define more strict semantics around filename Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66637/new/

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-09-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Tweak.h:130 +/// pointed by FID. +Tweak::Effect fileEdit(const SourceManager , FileID FID, + tooling::Replacements Replacements); kadircet wrote: > kadircet

[PATCH] D67213: [clang-tidy] Fix definitions in headers check to respect qualifiers

2019-09-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. The check was generating a fix without taking qualifiers in return type into account. This patch changes the insertion location to be before

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

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

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

2019-09-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:78 +// function decl. Skips local symbols. +llvm::DenseSet getNonLocalDeclRefs(const FunctionDecl *FD, + ParsedAST ) {

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

2019-09-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 220821. kadircet marked 17 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews.llvm.org/D65433 Files:

[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

2019-09-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. To be used by define-inline code action to determine whether the function/method body will still be valid

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

2019-07-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. Introduces DefineInline action and initial version of availability checks. Repository: rG LLVM Github Monorepo

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 212307. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64863/new/ https://reviews.llvm.org/D64863 Files:

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367303: [clangd] Ignore diags from builtin files (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 212131. kadircet marked 3 inline comments as done. kadircet added a comment. - Always set LastDiagWasAdjusted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64863/new/ https://reviews.llvm.org/D64863 Files:

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:563 FillDiagBase(*LastDiag); -adjustDiagFromHeader(*LastDiag, Info, *LangOpts); +if (!InsideMainFile) + LastDiagWasAdjusted = adjustDiagFromHeader(*LastDiag, Info, *LangOpts);

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210354. kadircet marked 5 inline comments as done. kadircet added a comment. - Add removeDots helper to FS.h - Revert changes in getFallbackCommands. - Add comments for the reasoning behind removeDots calls. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:77 GlobalCompilationDatabase::getFallbackCommand(PathRef File) const { + llvm::SmallString<128> CanonPath(File); + llvm::sys::path::remove_dots(CanonPath, true);

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:195 Intent intent() const override { return Refactor; } + // Compute the extraction context for the Selection + void computeExtractionContext(const SelectionTree::Node

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210511. kadircet marked 13 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:490 + auto FS = FSProvider.getFileSystem(); + llvm::DenseSet TUsToIndex; + for (auto : Result.Shards) { sammccall wrote: > nit: again, this patch is adding Path/PathRef

[PATCH] D64912: [Clangd] Changed ExtractVariable to only work on non empty selections

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Tweak.h:51 +/// The Length of the selection +unsigned SelectionLength; /// The AST nodes that were selected. maybe expose a `SourceLocation SelectionEnd` ? Repository:

[PATCH] D64912: [Clangd] Changed ExtractVariable to only work on non empty selections

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Tweak.h:51 +/// The Length of the selection +unsigned SelectionLength; /// The AST nodes that were selected. SureYeaah wrote: > kadircet wrote: > > maybe expose a

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210541. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp:93 + +void BackgroundIndexLoader::load(PathRef MainFile, + BackgroundIndexStorage *Storage) { sammccall wrote: > This handles

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:208 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); - if (!N) -return false; - Target = llvm::make_unique(N, SM, Ctx); - return

[PATCH] D64918: [ASTUnit] Fix a regression in cached completions

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. LGTM from my side as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64918/new/ https://reviews.llvm.org/D64918 ___ cfe-commits mailing

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210564. kadircet added a comment. - Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210589. kadircet marked an inline comment as done. kadircet added a comment. - Get rid of CachedShard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210594. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64860/new/ https://reviews.llvm.org/D64860 Files: clang-tools-extra/clangd/FS.cpp

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366455: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

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