Files
clang-p2996/clang/test/OpenMP/constexpr_capture.cpp
Nikita Popov 532dc62b90 [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
2022-04-07 12:09:47 +02:00

37 lines
1.2 KiB
C++

// RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -x c++ -triple powerpc64le-unknown-linux -S -emit-llvm %s -o - -std=c++11 2>&1 | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -x c++ -fopenmp-targets=x86_64-pc-linux-gnu -triple powerpc64le-unknown-linux -S -emit-llvm %s -o - -std=c++11 2>&1 | FileCheck %s
// expected-no-diagnostics
template <int __v> struct integral_constant {
static constexpr int value = __v;
};
template <typename _Tp, int v = 0, bool _IsArray = integral_constant<v>::value>
struct decay {
typedef int type;
};
struct V {
template <typename TArg0 = int, typename = typename decay<TArg0>::type> V();
};
constexpr double h_chebyshev_coefs[] = {
1.0000020784639703, 0.0021491446496202074};
void test(double *d_value)
{
#pragma omp target map(tofrom \
: d_value [0:1]) map(always, to \
: h_chebyshev_coefs [0:2])
*d_value = h_chebyshev_coefs[1]; return;
}
// CHECK: void @__omp_offloading_{{.+}}test{{.+}}(double* %0)
int main() {
#pragma omp target
V v;
return 0;
}
// CHECK: call void @__omp_offloading_{{.+}}_main_{{.+}}()