summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/complete-cxx-inline-methods.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2018-11-01 15:54:18 +0000
committerKadir Cetinkaya <kadircet@google.com>2018-11-01 15:54:18 +0000
commitfabaaaaadb04cb990de25fd5aa9c67f52debc2ed (patch)
tree1ea20bf26c46773e43af31e0db613fbd7e39c674 /clang/test/Index/complete-cxx-inline-methods.cpp
parent7c5310bbd3eeaa654f4f008e93f8a91cefe69c06 (diff)
downloadbcm5719-llvm-fabaaaaadb04cb990de25fd5aa9c67f52debc2ed.tar.gz
bcm5719-llvm-fabaaaaadb04cb990de25fd5aa9c67f52debc2ed.zip
[clang] Improve ctor initializer completions.
Summary: Instead of providing generic "args" for member and base class initializers, tries to fetch relevant constructors and show their signatures. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ZaMaZaN4iK, eraman, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53654 llvm-svn: 345844
Diffstat (limited to 'clang/test/Index/complete-cxx-inline-methods.cpp')
-rw-r--r--clang/test/Index/complete-cxx-inline-methods.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/clang/test/Index/complete-cxx-inline-methods.cpp b/clang/test/Index/complete-cxx-inline-methods.cpp
index 0f78e8caa74..aefc16f53f8 100644
--- a/clang/test/Index/complete-cxx-inline-methods.cpp
+++ b/clang/test/Index/complete-cxx-inline-methods.cpp
@@ -21,6 +21,13 @@ private:
int value;
MyCls *object;
};
+
+template <typename T>
+class X {};
+
+class Y : public X<int> {
+ Y() : X<int>() {}
+};
}
// RUN: c-index-test -code-completion-at=%s:4:9 -std=c++98 %s | FileCheck %s
@@ -35,10 +42,12 @@ private:
// CHECK-NEXT: Container Kind: StructDecl
// RUN: c-index-test -code-completion-at=%s:18:41 %s | FileCheck -check-prefix=CHECK-CTOR-INIT %s
-// CHECK-CTOR-INIT: NotImplemented:{TypedText MyCls}{LeftParen (}{Placeholder args}{RightParen )} (7)
-// CHECK-CTOR-INIT: MemberRef:{TypedText object}{LeftParen (}{Placeholder args}{RightParen )} (35)
-// CHECK-CTOR-INIT: MemberRef:{TypedText value}{LeftParen (}{Placeholder args}{RightParen )} (35)
+// CHECK-CTOR-INIT: ClassDecl:{TypedText MyCls}{LeftParen (}{Placeholder MyCls}{RightParen )} (7)
+// CHECK-CTOR-INIT: MemberRef:{TypedText object}{LeftParen (}{Placeholder MyCls *}{RightParen )} (35)
+// CHECK-CTOR-INIT: MemberRef:{TypedText value}{LeftParen (}{Placeholder int}{RightParen )} (35)
// RUN: c-index-test -code-completion-at=%s:18:55 %s | FileCheck -check-prefix=CHECK-CTOR-INIT-2 %s
-// CHECK-CTOR-INIT-2-NOT: NotImplemented:{TypedText MyCls}{LeftParen (}{Placeholder args}{RightParen )}
-// CHECK-CTOR-INIT-2: MemberRef:{TypedText object}{LeftParen (}{Placeholder args}{RightParen )} (35)
-// CHECK-CTOR-INIT-2: MemberRef:{TypedText value}{LeftParen (}{Placeholder args}{RightParen )} (7)
+// CHECK-CTOR-INIT-2-NOT: ClassDecl:{TypedText MyCls}{LeftParen (}{Placeholder MyCls}{RightParen )} (7)
+// CHECK-CTOR-INIT-2: MemberRef:{TypedText object}{LeftParen (}{Placeholder MyCls *}{RightParen )} (35)
+// CHECK-CTOR-INIT-2: MemberRef:{TypedText value}{LeftParen (}{Placeholder int}{RightParen )} (7)
+// RUN: c-index-test -code-completion-at=%s:29:9 %s | FileCheck -check-prefix=CHECK-CTOR-INIT-3 %s
+// CHECK-CTOR-INIT-3: ClassDecl:{TypedText X<int>}{LeftParen (}{Placeholder X<int>}{RightParen )} (7)
OpenPOWER on IntegriCloud