[clang-tools-extra] [clangd] SelectionTree marks nodes as complete only if children are complete (PR #82237)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 03:26:55 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-clangd
Author: Sam McCall (sam-mccall)
<details>
<summary>Changes</summary>
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
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/82237
More information about the cfe-commits
mailing list