blob: 44b34aa12cfa9e82c7ad0b7ab3cb2ac9896734e2 [file] [log] [blame]
Eli Friedmana143a9d2012-10-12 22:45:14 +00001// RUN: %clang_cc1 -ast-print %s | FileCheck %s
2
3// CHECK: r;
4// CHECK-NEXT: (r->method());
5struct MyClass
6{
7 void method() {}
8};
9
10struct Reference
11{
12 MyClass* object;
13 MyClass* operator ->() { return object; }
14};
15
16int main()
17{
18 Reference r;
19 (r->method());
20}
21
Eli Friedman915c07d2012-10-16 23:45:15 +000022// CHECK: if (int a = 1)
23// CHECK: while (int a = 1)
24// CHECK: switch (int a = 1)
25
26void f()
27{
28 if (int a = 1) { }
29 while (int a = 1) { }
30 switch (int a = 1) { }
31}
32