aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/PR29152.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:18:08 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:18:08 +0000
commitbab175ec4b075c8076ba14c762900392533f6ee4 (patch)
tree01f4f29419a2cb10abe13c1e63cd2a66068b0137 /test/SemaCXX/PR29152.cpp
parent8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff)
Vendor import of clang trunk r290819:vendor/clang/clang-trunk-r290819
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
+ }
+}