[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-pdbutil / Inputs / TypeQualifiersTest.cpp
blob02dce9f611dfc096912a526b01cad3f108c9bfd9
1 // Compile with "cl /c /Zi /GR- TypeQualifiersTest.cpp"
2 // Link with "link TypeQualifiersTest.obj /debug /nodefaultlib /entry:main"
4 union Union {
5 int * __restrict x_member;
6 float * __restrict y_member;
7 int* volatile __restrict m_volatile;
8 const char* m_const;
9 };
11 int f(const volatile int* __restrict arg_crv) {
12 Union u;
13 return 1;
16 void g(int& __restrict arg_ref) {
19 namespace NS {
20 class Class {
21 public:
22 int get() const { return 1;}
23 int set() __restrict { return 2; }
24 void help() volatile { return; }
27 struct Foo {
28 int a;
29 int b;
30 int func(int x) __restrict { return 1; }
33 Foo s = { 10 };
35 const int* __restrict p_object = &s.a;
37 volatile int Foo:: * __restrict p_data_member = &Foo::a;
39 int (Foo::* p_member_func)(int) __restrict = &Foo::func;
42 typedef long* __restrict RestrictTypedef;
43 RestrictTypedef RestrictVar;
45 typedef volatile int* __restrict RankNArray[10][100];
46 RankNArray ArrayVar;
48 int main() {
49 NS::Class ClassVar;
50 ClassVar.get();
51 ClassVar.help();
52 ClassVar.set();
54 return 0;