[TySan] Don't report globals with incomplete types. (#121922)
[llvm-project.git] / clang / test / OpenMP / assume_template.cpp
blob20d1c5d437145806534b9db5612f58c57af02056
1 // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -verify %s -ast-print | FileCheck %s
4 // expected-no-diagnostics
6 #ifndef HEADER
7 #define HEADER
9 extern int qux(int);
11 template<typename T>
12 int foo(T arg)
14 #pragma omp assume no_openmp_routines
16 auto fn = [](int x) { return qux(x); };
17 // CHECK: auto fn = [](int x) {
18 return fn(5);
22 template<typename T>
23 class C {
24 T m;
26 public:
27 T bar(T a);
30 // We're really just checking this parses. All the assumptions are thrown
31 // away immediately for now.
32 template<typename T>
33 T C<T>::bar(T a)
35 #pragma omp assume holds(sizeof(T) == 8) absent(parallel)
37 return (T)qux((int)a);
38 // CHECK: return (T)qux((int)a);
42 #endif