summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ast-print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/ast-print.cpp')
-rw-r--r--clang/test/SemaCXX/ast-print.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/ast-print.cpp b/clang/test/SemaCXX/ast-print.cpp
index 977ba7afa4d..3d98fd8ef3a 100644
--- a/clang/test/SemaCXX/ast-print.cpp
+++ b/clang/test/SemaCXX/ast-print.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -ast-print %s -std=gnu++11 | FileCheck %s
// CHECK: r;
// CHECK-NEXT: (r->method());
@@ -173,3 +173,26 @@ void test14() {
float test15() {
return __builtin_asinf(1.0F);
}
+
+namespace PR18776 {
+struct A {
+ operator void *();
+ explicit operator bool();
+ A operator&(A);
+};
+
+// CHECK: struct A
+// CHECK-NEXT: {{^[ ]*operator}} void *();
+// CHECK-NEXT: {{^[ ]*explicit}} operator bool();
+
+void bar(void *);
+
+void foo() {
+ A a, b;
+ bar(a & b);
+// CHECK: bar(a & b);
+ if (a & b)
+// CHECK: if (a & b)
+ return;
+}
+};
OpenPOWER on IntegriCloud