aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/PR29152.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR29152.cpp')
-rw-r--r--test/SemaCXX/PR29152.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaCXX/PR29152.cpp b/test/SemaCXX/PR29152.cpp
new file mode 100644
index 000000000000..63c9c9bed545
--- /dev/null
+++ b/test/SemaCXX/PR29152.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -Wunreachable-code -verify %s
+
+static const bool False = false;
+
+struct A {
+ ~A();
+ operator bool();
+};
+void Bar();
+
+void Foo() {
+ if (False && A()) {
+ Bar(); // expected-no-diagnostics
+ }
+}