Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clangd] SelectionTree marks nodes as complete only if children are complete #82237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sam-mccall
Copy link
Collaborator

This seems to be the semantics expected by ~all callers, and simplifies
upcoming patches extending extract-variable.

…omplete

This seems to be the semantics expected by ~all callers, and simplifies
upcoming patches extending extract-variable.
@llvmbot
Copy link
Member

llvmbot commented Feb 19, 2024

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clangd

Author: Sam McCall (sam-mccall)

Changes

This seems to be the semantics expected by ~all callers, and simplifies
upcoming patches extending extract-variable.


Full diff: https://github.com/llvm/llvm-project/pull/82237.diff

1 Files Affected:

  • (modified) clang-tools-extra/clangd/unittests/SelectionTests.cpp (+1)
diff --git a/clang-tools-extra/clangd/unittests/SelectionTests.cpp b/clang-tools-extra/clangd/unittests/SelectionTests.cpp
index 754e8c287c5148..162428f8169158 100644
--- a/clang-tools-extra/clangd/unittests/SelectionTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SelectionTests.cpp
@@ -688,6 +688,7 @@ TEST(SelectionTest, Selected) {
       )cpp",
       R"cpp( $C[[^$C[[int]] a^]]; )cpp",
       R"cpp( $C[[^$C[[int]] a = $C[[5]]^]]; )cpp",
+      R"cpp( int x = [[2 ^+ $C[[2]]^]]; )cpp",
   };
   for (const char *C : Cases) {
     Annotations Test(C);

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mentioned this offline already but putting in here as well for my sanity.

the patch is missing the actual changes to the logic, it only has test changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants