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

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f251eece466: [clangd] Define out-of-line availability checks (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69266/new/ https://revie

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

2019-11-28 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. Build result: pass - 60292 tests passed, 0 failed and 732 were skipped. Log files: console-log.txt , CMakeCache.txt

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

2019-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231374. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments - Bail out on templated classes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69266/new/ https://reviews.llvm.org

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

2019-11-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. still lgtm. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:72 +// definition even if we are inside a source file. +if (!Sel.AST.getASTContext().getLangOpts().IsHeaderFile) + return false; nit: we have

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

2019-10-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1549 + + // Not available for out-of-line metohds. + EXPECT_UNAVAILABLE(R"cpp( nit: metohds => methods. Repository: rG LLVM Github Mon

[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] 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-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1556 + +[[void [[Bar::[[b^a^z() [[{ + return; Sorry for not spotting it earlier. Moving out-of-line methods is different than general functions, `void Bar::

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

2019-10-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:77 +Source = getSelectedFunction(Sel.ASTSelection.commonAncestor()); +if (!Source || !Source->isThisDeclarationADefinition()) + return false; I think

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

2019-10-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1525 +TEST_F(DefineOutlineTest, TriggersOnFunctionDecl) { + // Not available unless in a header file. + EX

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

2019-10-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:29 +// criteria is met. +const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { + if (!SelNode) hokein wrote: > nit: looks like we also

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

2019-10-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 226045. 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/D69266/new/ https://reviews.llvm.org/D69266 Files: clang-tools-ex

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

2019-10-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. the patch looks mostly good. would be interesting to see `apply` implementation. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:29 +// criteria is met. +const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) {

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

2019-10-21 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, mgorny. Herald added a project: clang. Initial availability checks for performing define out-of-line code action, which is a refactoring