brintos

brintos / llvm-project-archived public Read only

0
0
Text · 852 B · 86d0b5c Raw
33 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify %s2 3namespace {4// TODO this must be fixed. This warning shouldn't be generated.5// expected-warning@+1{{function '(anonymous namespace)::bar' has internal linkage but is not defined}}6void bar();7} // namespace8 9#pragma omp begin declare variant match(user = {condition(1)})10void bar() {11}12#pragma omp end declare variant13 14// expected-warning@+1{{function 'baz' has internal linkage but is not defined}}15static void baz();16#pragma omp begin declare variant match(device = {kind(nohost)})17static void baz() {}18#pragma omp end declare variant19 20#pragma omp begin declare variant match(device = {kind(host)})21static void foo() {}22#pragma omp end declare variant23 24int main() {25  foo();26  // expected-note@+1{{used here}}27  baz();28  // expected-note@+1{{used here}}29  bar();30 31  return 0;32}33