22 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):11 %s -o - \
23 // RUN: | FileCheck -check-prefix=THIS %s
24 // THIS: priv (InBase,Inaccessible)
25 // THIS: prot (InBase)
28 // Also check implicit 'this->', i.e. complete at the start of the line.
29 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):1 %s -o - \
30 // RUN: | FileCheck -check-prefix=THIS %s
33 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):9 %s -o - \
34 // RUN: | FileCheck -check-prefix=X-OBJ %s
35 // X-OBJ: priv (Inaccessible)
36 // X-OBJ: prot (Inaccessible)
37 // X-OBJ: pub : [#int#]pub
40 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):9 %s -o - \
41 // RUN: | FileCheck -check-prefix=Y-OBJ %s
42 // Y-OBJ: priv (InBase,Inaccessible)
43 // Y-OBJ: prot (InBase)
44 // Y-OBJ: pub (InBase)
48 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):14 %s -o - \
49 // RUN: | FileCheck -check-prefix=THIS-BASE %s
51 // THIS-BASE: priv (Inaccessible)
52 // THIS-BASE: prot : [#int#]prot
53 // THIS-BASE: pub : [#int#]pub
55 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):8 %s -o - \
56 // RUN: | FileCheck -check-prefix=THIS-BASE %s
59 this->Unrelated::pub
= 10; // a check we don't crash in this cases.
60 Y().Unrelated::pub
= 10; // a check we don't crash in this cases.
62 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-3):22 %s -o - \
63 // RUN: | FileCheck -check-prefix=UNRELATED %s
64 // UNRELATED: priv (Inaccessible)
65 // UNRELATED: prot (Inaccessible)
66 // UNRELATED: pub : [#int#]pub
68 // RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):20 %s -o - \
69 // RUN: | FileCheck -check-prefix=UNRELATED %s
70 // RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-9):16 %s -o - \
71 // RUN: | FileCheck -check-prefix=UNRELATED %s
86 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):14 %s -o - \
87 // RUN: | FileCheck -check-prefix=OUTER %s
88 // OUTER: priv : [#int#]priv
89 // OUTER: prot : [#int#]prot
90 // OUTER: pub : [#int#]pub
92 // Also check the unqualified case.
93 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):1 %s -o - \
94 // RUN: | FileCheck -check-prefix=OUTER %s
104 class Accessible
: public Base
{
107 class Inaccessible
: private Base
{
110 class Test
: public Accessible
, public Inaccessible
{
112 this->Accessible::pub
= 10;
113 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):23 %s -o - \
114 // RUN: | FileCheck -check-prefix=ACCESSIBLE %s
115 // ACCESSIBLE: pub (InBase)
117 this->Inaccessible::pub
= 10;
118 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):25 %s -o - \
119 // RUN: | FileCheck -check-prefix=INACCESSIBLE %s
120 // INACCESSIBLE: pub (InBase,Inaccessible)