summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/unittests/SelectionTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/unittests/SelectionTests.cpp')
-rw-r--r--clang-tools-extra/clangd/unittests/SelectionTests.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/unittests/SelectionTests.cpp b/clang-tools-extra/clangd/unittests/SelectionTests.cpp
index e1a103e8a2b..964f0e98e28 100644
--- a/clang-tools-extra/clangd/unittests/SelectionTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SelectionTests.cpp
@@ -210,6 +210,15 @@ TEST(SelectionTest, CommonAncestor) {
)cpp",
"FunctionProtoTypeLoc",
},
+ {
+ R"cpp(
+ struct S {
+ int foo;
+ int bar() { return [[f^oo]]; }
+ };
+ )cpp",
+ "MemberExpr", // Not implicit CXXThisExpr!
+ },
// Point selections.
{"void foo() { [[^foo]](); }", "DeclRefExpr"},
OpenPOWER on IntegriCloud