================ @@ -0,0 +1,33 @@ +// Test is line- and column-sensitive. Run lines are below + +template <typename T> +class basic_vector { +public: + T x; + T y; +}; + +using my_vec = basic_vector<int>; + +class MyClass { + my_vec myVec; +}; + +struct OuterStruct { + struct InnerStruct; + int outer_field; +}; + +// RUN: c-index-test -single-symbol-sgf-at=%s:13:13 local %s | FileCheck --check-prefix=CHECK-MYVEC %s +// CHECK-MYVEC: "parentContexts":[{"kind":"c++.class","name":"MyClass","usr":"c:@S@MyClass"},{"kind":"c++.property","name":"myVec","usr":"c:@S@MyClass@FI@myVec"}] +// CHECK-MYVEC: "identifier":{"interfaceLanguage":"c++","precise":"c:@S@MyClass@FI@myVec"} +// CHECK-MYVEC: "kind":{"displayName":"Instance Property","identifier":"c++.property"} ---------------- QuietMisdreavus wrote:
`myVec` was what was triggering the problem of template argument fragments. AFAIK it's because libclang is also checking for `my_vec` at the same time, but if you set the cursor position on the `my_vec` type there it works. I can add another cursor check for the `my_vec` type itself if you'd like. https://github.com/llvm/llvm-project/pull/132297 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits