CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
123 lines
3.4 KiB
C++
123 lines
3.4 KiB
C++
class X {
|
|
public:
|
|
int pub;
|
|
protected:
|
|
int prot;
|
|
private:
|
|
int priv;
|
|
};
|
|
|
|
class Unrelated {
|
|
public:
|
|
static int pub;
|
|
protected:
|
|
static int prot;
|
|
private:
|
|
static int priv;
|
|
};
|
|
|
|
class Y : public X {
|
|
int test() {
|
|
this->pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):11 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=THIS %s
|
|
// THIS: priv (InBase,Inaccessible)
|
|
// THIS: prot (InBase)
|
|
// THIS: pub (InBase)
|
|
//
|
|
// Also check implicit 'this->', i.e. complete at the start of the line.
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):1 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=THIS %s
|
|
|
|
X().pub + 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):9 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=X-OBJ %s
|
|
// X-OBJ: priv (Inaccessible)
|
|
// X-OBJ: prot (Inaccessible)
|
|
// X-OBJ: pub : [#int#]pub
|
|
|
|
Y().pub + 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):9 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=Y-OBJ %s
|
|
// Y-OBJ: priv (InBase,Inaccessible)
|
|
// Y-OBJ: prot (InBase)
|
|
// Y-OBJ: pub (InBase)
|
|
|
|
this->X::pub = 10;
|
|
X::pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):14 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=THIS-BASE %s
|
|
//
|
|
// THIS-BASE: priv (Inaccessible)
|
|
// THIS-BASE: prot : [#int#]prot
|
|
// THIS-BASE: pub : [#int#]pub
|
|
//
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):8 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=THIS-BASE %s
|
|
|
|
|
|
this->Unrelated::pub = 10; // a check we don't crash in this cases.
|
|
Y().Unrelated::pub = 10; // a check we don't crash in this cases.
|
|
Unrelated::pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-3):22 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=UNRELATED %s
|
|
// UNRELATED: priv (Inaccessible)
|
|
// UNRELATED: prot (Inaccessible)
|
|
// UNRELATED: pub : [#int#]pub
|
|
//
|
|
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):20 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=UNRELATED %s
|
|
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-9):16 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=UNRELATED %s
|
|
}
|
|
};
|
|
|
|
class Outer {
|
|
public:
|
|
static int pub;
|
|
protected:
|
|
static int prot;
|
|
private:
|
|
static int priv;
|
|
|
|
class Inner {
|
|
int test() {
|
|
Outer::pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):14 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=OUTER %s
|
|
// OUTER: priv : [#int#]priv
|
|
// OUTER: prot : [#int#]prot
|
|
// OUTER: pub : [#int#]pub
|
|
|
|
// Also check the unqualified case.
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):1 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=OUTER %s
|
|
}
|
|
};
|
|
};
|
|
|
|
class Base {
|
|
public:
|
|
int pub;
|
|
};
|
|
|
|
class Accessible : public Base {
|
|
};
|
|
|
|
class Inaccessible : private Base {
|
|
};
|
|
|
|
class Test : public Accessible, public Inaccessible {
|
|
int test() {
|
|
this->Accessible::pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):23 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=ACCESSIBLE %s
|
|
// ACCESSIBLE: pub (InBase)
|
|
|
|
this->Inaccessible::pub = 10;
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):25 %s -o - \
|
|
// RUN: | FileCheck -check-prefix=INACCESSIBLE %s
|
|
// INACCESSIBLE: pub (InBase,Inaccessible)
|
|
}
|
|
};
|