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
78 lines
1.8 KiB
C++
78 lines
1.8 KiB
C++
// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
|
|
|
|
// PR13819
|
|
// REQUIRES: LP64
|
|
|
|
// [dcl.ambig.res]p1:
|
|
struct S {
|
|
S(int);
|
|
void bar();
|
|
};
|
|
|
|
int returns_an_int();
|
|
|
|
void foo(double a)
|
|
{
|
|
S w(int(a)); // expected-warning{{disambiguated as a function declaration}} expected-note{{add a pair of parentheses}}
|
|
w(17);
|
|
S x1(int()); // expected-warning{{disambiguated as a function declaration}} expected-note{{add a pair of parentheses}}
|
|
x1(&returns_an_int);
|
|
S y((int)a);
|
|
y.bar();
|
|
S z = int(a);
|
|
z.bar();
|
|
}
|
|
|
|
// [dcl.ambig.res]p3:
|
|
char *p;
|
|
void *operator new(__SIZE_TYPE__, int);
|
|
void foo3() {
|
|
const int x = 63;
|
|
new (int(*p)) int; //new-placement expression
|
|
new (int(*[x])); //new type-id
|
|
}
|
|
|
|
// [dcl.ambig.res]p4:
|
|
template <class T> // expected-note{{here}}
|
|
struct S4 {
|
|
T *p;
|
|
};
|
|
S4<int()> x; //type-id
|
|
S4<int(1)> y; // expected-error{{must be a type}}
|
|
|
|
// [dcl.ambig.res]p5:
|
|
void foo5()
|
|
{
|
|
(void)sizeof(int(1)); //expression
|
|
(void)sizeof(int()); // expected-error{{function type}}
|
|
}
|
|
|
|
// [dcl.ambig.res]p6:
|
|
void foo6()
|
|
{
|
|
(void)(int(1)); //expression
|
|
(void)(int())1; // expected-error{{to 'int ()'}}
|
|
}
|
|
|
|
// [dcl.ambig.res]p7:
|
|
class C7 { };
|
|
void f7(int(C7)) { } // expected-note{{candidate}}
|
|
int g7(C7);
|
|
void foo7() {
|
|
f7(1); // expected-error{{no matching function}}
|
|
f7(g7); //OK
|
|
}
|
|
|
|
void h7(int *(C7[10])) { } // expected-note{{previous}}
|
|
void h7(int *(*_fp)(C7 _parm[10])) { } // expected-error{{redefinition}}
|
|
|
|
struct S5 {
|
|
static bool const value = false;
|
|
};
|
|
int foo8() {
|
|
int v(int(S5::value)); // expected-warning{{disambiguated as a function declaration}} expected-note{{add a pair of parentheses}} expected-error{{parameter declarator cannot be qualified}}
|
|
}
|
|
|
|
template<typename T>
|
|
void rdar8739801( void (T::*)( void ) __attribute__((unused)) );
|