blob: 6645569d82a776b4bae6507c11c91fb7d66b3bdc [file] [log] [blame]
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +00001class A {
2 public:
3 virtual void vfunc(bool param);
4 virtual void vfunc(bool param, int p);
5 void func(bool param);
6};
7class B : public A {
8virtual int ttt(bool param, int x = 3) const;
9void vfunc(bool param, int p) override;
10};
11class C : public B {
12 public:
13 void vfunc(bool param) override;
Ilya Biryukovcabab292019-05-24 10:18:39 +000014 vf
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000015};
16
Ilya Biryukovcabab292019-05-24 10:18:39 +000017// Runs completion at ^vf
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000018// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:14:3 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
19// CHECK-CC1: COMPLETION: Pattern : int ttt(bool param, int x = 3) const override{{$}}
20// CHECK-CC1: COMPLETION: Pattern : void vfunc(bool param, int p) override{{$}}
21// CHECK-CC1-NOT: COMPLETION: Pattern : void vfunc(bool param) override{{$}}
22//
Ilya Biryukovcabab292019-05-24 10:18:39 +000023// Runs completion at vf^
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000024// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:14:5 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000025// CHECK-CC2-NOT: COMPLETION: Pattern : int ttt(bool param, int x = 3) const override{{$}}
Ilya Biryukovcabab292019-05-24 10:18:39 +000026// CHECK-CC2: COMPLETION: Pattern : void vfunc(bool param, int p) override{{$}}
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000027// CHECK-CC2-NOT: COMPLETION: Pattern : void vfunc(bool param) override{{$}}
28//
Ilya Biryukovcabab292019-05-24 10:18:39 +000029// Runs completion at void ^ on line 13.
30// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:13:8 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
Kadir Cetinkayaae45d0a42018-10-02 09:42:31 +000031// CHECK-CC3-NOT: COMPLETION: Pattern : int ttt(bool param, int x = 3) const override{{$}}
32// CHECK-CC3-NOT: COMPLETION: Pattern : void vfunc(bool param, int p) override{{$}}
33// CHECK-CC3-NOT: COMPLETION: Pattern : void vfunc(bool param) override{{$}}