196edb2e3SAlexey Bataev // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
296edb2e3SAlexey Bataev // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
396edb2e3SAlexey Bataev // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
496edb2e3SAlexey Bataev
596edb2e3SAlexey Bataev // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY1 %s
696edb2e3SAlexey Bataev // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
796edb2e3SAlexey Bataev // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s
896edb2e3SAlexey Bataev // SIMD-ONLY1-NOT: {{__kmpc|__tgt}}
996edb2e3SAlexey Bataev
1096edb2e3SAlexey Bataev // expected-no-diagnostics
1196edb2e3SAlexey Bataev //
1296edb2e3SAlexey Bataev #ifndef HEADER
1396edb2e3SAlexey Bataev #define HEADER
1496edb2e3SAlexey Bataev
15*fd739804SFangrui Song // CHECK: @{{.*}}Foo{{.*}}bar{{.*}} ={{.*}} constant i32 1,
1696edb2e3SAlexey Bataev
1796edb2e3SAlexey Bataev // Section A - Define a class with a static constexpr data member.
1896edb2e3SAlexey Bataev struct Foo {
1996edb2e3SAlexey Bataev static constexpr int bar = 1;
2096edb2e3SAlexey Bataev };
2196edb2e3SAlexey Bataev
2296edb2e3SAlexey Bataev // Section B - ODR-use the data member.
2396edb2e3SAlexey Bataev void F(const int &);
Test()2496edb2e3SAlexey Bataev void Test() { F(Foo::bar); }
2596edb2e3SAlexey Bataev
2696edb2e3SAlexey Bataev // Section C - Define the data member.
2796edb2e3SAlexey Bataev constexpr int Foo::bar;
2896edb2e3SAlexey Bataev #endif
2996edb2e3SAlexey Bataev
30