]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Headers/ms-intrin.cpp
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / Headers / ms-intrin.cpp
1 // RUN: %clang_cc1 -triple i386-pc-win32 -target-cpu pentium4 \
2 // RUN:     -fms-extensions -fms-compatibility -fmsc-version=1700 \
3 // RUN:     -ffreestanding -verify %s
4
5 // Intrin.h needs size_t, but -ffreestanding prevents us from getting it from
6 // stddef.h.  Work around it with this typedef.
7 typedef __SIZE_TYPE__ size_t;
8
9 #include <Intrin.h>
10
11 // Use some C++ to make sure we closed the extern "C" brackets.
12 template <typename T>
13 void foo(T V) {}
14
15 void bar() {
16   _ReadWriteBarrier();  // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
17   _ReadBarrier();       // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
18   _WriteBarrier();      // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
19   // FIXME: It'd be handy if we didn't have to hardcode the line number in
20   // intrin.h.
21   // expected-note@Intrin.h:754 {{declared here}}
22   // expected-note@Intrin.h:759 {{declared here}}
23   // expected-note@Intrin.h:764 {{declared here}}
24 }