1 // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s 2 3 // RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s 4 5 // expected-no-diagnostics 6 7 int foo(void); 8 9 #pragma omp declare variant(foo) match(xxx={}, yyy={ccc}) 10 #pragma omp declare variant(foo) match(xxx={vvv}) 11 #pragma omp declare variant(foo) match(implementation={vendor(score(0):llvm)}, device={kind(fpga)}) 12 #pragma omp declare variant(foo) match(implementation={vendor(llvm), xxx}) 13 #pragma omp declare variant(foo) match(implementation={vendor(unknown)}, device={kind(gpu)}) 14 #pragma omp declare variant(foo) match(implementation={vendor(score(5): ibm, xxx, ibm)}, device={kind(cpu, nohost)}) 15 #pragma omp declare variant(foo) match(device={kind(host)}) 16 #pragma omp declare variant(foo) match(device={kind(nohost), xxx}) 17 #pragma omp declare variant(foo) match(implementation={extension(match_all)}) 18 #pragma omp declare variant(foo) match(implementation={extension(match_any)}) 19 #pragma omp declare variant(foo) match(implementation={extension(match_none)}) 20 int bar(void); 21 22 // CHECK: int foo(); 23 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={extension(match_none)}) 24 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={extension(match_any)}) 25 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={extension(match_all)}) 26 // CHECK-NEXT: #pragma omp declare variant(foo) match(device={kind(nohost)}) 27 // CHECK-NEXT: #pragma omp declare variant(foo) match(device={kind(host)}) 28 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(score(5): ibm)}, device={kind(cpu, nohost)}) 29 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(unknown)}, device={kind(gpu)}) 30 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(llvm)}) 31 // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(score(0): llvm)}, device={kind(fpga)}) 32 // CHECK-NEXT: int bar(); 33