diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-10-16 23:55:06 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-10-16 23:55:06 +0000 |
commit | 667f95395f27ec5a060ab67c19c5090e517b19ff (patch) | |
tree | 6519cf1b0bbcb1cc9b4991cead89ecee9f46b004 /clang/test/SemaCXX/ast-print.cpp | |
parent | 494109b055945f599a6f4ba42fd30fd3c79b1579 (diff) | |
download | bcm5719-llvm-667f95395f27ec5a060ab67c19c5090e517b19ff.tar.gz bcm5719-llvm-667f95395f27ec5a060ab67c19c5090e517b19ff.zip |
Move test to a more appropriate place.
llvm-svn: 166078
Diffstat (limited to 'clang/test/SemaCXX/ast-print.cpp')
-rw-r--r-- | clang/test/SemaCXX/ast-print.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/ast-print.cpp b/clang/test/SemaCXX/ast-print.cpp new file mode 100644 index 00000000000..44b34aa12cf --- /dev/null +++ b/clang/test/SemaCXX/ast-print.cpp @@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -ast-print %s | FileCheck %s + +// CHECK: r; +// CHECK-NEXT: (r->method()); +struct MyClass +{ + void method() {} +}; + +struct Reference +{ + MyClass* object; + MyClass* operator ->() { return object; } +}; + +int main() +{ + Reference r; + (r->method()); +} + +// CHECK: if (int a = 1) +// CHECK: while (int a = 1) +// CHECK: switch (int a = 1) + +void f() +{ + if (int a = 1) { } + while (int a = 1) { } + switch (int a = 1) { } +} + |