Files
TheRock/compiler/amd-llvm/clang/test/Misc/diag-overload-cand-ranges.cpp
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

73 lines
2.5 KiB
C++

// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whitespace
// CHECK: error: no matching function
template <typename T> struct mcdata {
typedef int result_type;
};
template <class T> typename mcdata<T>::result_type wrap_mean(mcdata<T> const &);
// CHECK: :{[[@LINE+1]]:19-[[@LINE+1]]:53}: note: {{.*}}: no overload of 'wrap_mean'
void add_property(double (*)(mcdata<double> const &));
void f() { add_property(&wrap_mean); }
// CHECK: error: no matching function
// CHECK: :{[[@LINE+1]]:10-[[@LINE+1]]:51}: note: {{.*}}: cannot pass pointer to generic address space
void baz(__attribute__((opencl_private)) int *Data) {}
void fizz() {
int *Nop;
baz(Nop);
// CHECK: error: no matching function
// CHECK: :[[@LINE+1]]:53: note: {{.*}}: 'this' object is in address space '__private'
__attribute__((opencl_private)) static auto err = [&]() {};
err();
}
// CHECK: error: no matching function
struct Bar {
// CHECK: :{[[@LINE+1]]:26-[[@LINE+1]]:32}: note: {{.*}} would lose const qualifier
static void foo(int num, int *X) {}
// CHECK: :{[[@LINE+1]]:17-[[@LINE+1]]:25}: note: {{.*}} no known conversion
static void foo(int *err, int *x) {}
};
void bar(const int *Y) {
Bar::foo(5, Y);
}
struct InComp;
struct A {};
struct B : public A{};
// CHECK: error: no matching function
// CHECK: :{[[@LINE+5]]:36-[[@LINE+5]]:50}: note: {{.*}}: cannot convert initializer
// CHECK: error: no matching function
// CHECK: :{[[@LINE+3]]:36-[[@LINE+3]]:50}: note: {{.*}}: cannot convert argument
// CHECK: error: no matching function
// CHECK: :{[[@LINE+1]]:11-[[@LINE+1]]:18}: note: {{.*}}: no known conversion
void hoge(char aa, const char *bb, const A& third);
// CHECK: error: no matching function
// CHECK: :{[[@LINE+1]]:14-[[@LINE+1]]:16}: note: {{.*}}: cannot convert from base class
void derived(B*);
void func(const A &arg) {
hoge(1, "pass", {{{arg}}});
InComp *a;
hoge(1, "pass", a);
hoge("first", 5, 6);
A *b;
derived(b);
}
struct Q {
// CHECK: error: invalid operands
// CHECK: :[[@LINE+1]]:6: note: {{.*}}: 'this' argument has type 'const Q'
Q &operator+(void*);
};
void fuga(const Q q) { q + 3; }
template <short T> class Type1 {};
// CHECK: error: no matching function
// CHECK: :{[[@LINE+1]]:43-[[@LINE+1]]:54}: note: {{.*}}: expects an lvalue
template <short T> void Function1(int zz, Type1<T> &x, int ww) {}
void Function() { Function1(33, Type1<-42>(), 66); }