| 1 |
// RUN: split-file %s %t.dir |
| 2 |
// RUN: %clang_cc1 -verify %t.dir/defined.cpp |
| 3 |
// RUN: %clang_cc1 -verify -mthread-model posix %t.dir/defined.cpp |
| 4 |
// RUN: %clang_cc1 -verify -mthread-model single %t.dir/not-defined.cpp |
| 5 |
// RUN: %clang_cc1 -verify -x c %t.dir/not-defined.cpp |
| 6 |
|
| 7 |
//--- defined.cpp |
| 8 |
// expected-no-diagnostics |
| 9 |
#ifndef __STDCPP_THREADS__ |
| 10 |
#error __STDCPP_THREADS__ is not defined in posix thread model. |
| 11 |
#endif |
| 12 |
|
| 13 |
//--- not-defined.cpp |
| 14 |
// expected-no-diagnostics |
| 15 |
#ifdef __STDCPP_THREADS__ |
| 16 |
#error __STDCPP_THREADS__ is defined in single thread model. |
| 17 |
#endif |