diff options
Diffstat (limited to 'clang/test/CXX/ast-print.cpp')
-rw-r--r-- | clang/test/CXX/ast-print.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CXX/ast-print.cpp b/clang/test/CXX/ast-print.cpp new file mode 100644 index 00000000000..fb8588d4b13 --- /dev/null +++ b/clang/test/CXX/ast-print.cpp @@ -0,0 +1,21 @@ +// 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()); +} + |