summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-12-11 18:58:18 +0000
committerHans Wennborg <hans@hanshq.net>2017-12-11 18:58:18 +0000
commitb1c8f452499d6dfd61b269b91f7cae1e41cf6d35 (patch)
tree15044c1f426d216a05dc7b2ba693cda8703983ab
parenta8ab1b75cb0d84ea61642d7b7c0139e6e367c28e (diff)
downloadbcm5719-llvm-b1c8f452499d6dfd61b269b91f7cae1e41cf6d35.tar.gz
bcm5719-llvm-b1c8f452499d6dfd61b269b91f7cae1e41cf6d35.zip
Fix warn-enum-compare.cpp on Windows
It's been failing since r319875. llvm-svn: 320405
-rw-r--r--clang/test/SemaCXX/warn-enum-compare.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/warn-enum-compare.cpp b/clang/test/SemaCXX/warn-enum-compare.cpp
index 95107a0146d..21dea5dfcb0 100644
--- a/clang/test/SemaCXX/warn-enum-compare.cpp
+++ b/clang/test/SemaCXX/warn-enum-compare.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 %s -fsyntax-only -verify -triple %itanium_abi_triple
+// RUN: %clang_cc1 %s -fsyntax-only -verify -triple %ms_abi_triple -DMSABI
enum Foo { FooA, FooB, FooC };
enum Bar { BarD, BarE, BarF };
@@ -42,8 +43,10 @@ void test () {
while (b == c);
while (B1 == name1::B2);
while (B2 == name2::B1);
+#ifndef MSABI
while (x == AnonAA); // expected-warning {{comparison of constant 'AnonAA' (42) with expression of type 'Foo' is always false}}
while (AnonBB == y); // expected-warning {{comparison of constant 'AnonBB' (45) with expression of type 'Bar' is always false}}
+#endif
while (AnonAA == AnonAB);
while (AnonAB == AnonBA);
while (AnonBB == AnonAA);
@@ -69,7 +72,9 @@ void test () {
while (B2 == ((((((name2::B1)))))));
while (td == Anon1);
+#ifndef MSABI
while (td == AnonAA); // expected-warning {{comparison of constant 'AnonAA' (42) with expression of type 'TD' is always false}}
+#endif
while (B1 == B2); // expected-warning {{comparison of two values with different enumeration types ('name1::Baz' and 'name2::Baz')}}
while (name1::B2 == name2::B3); // expected-warning {{comparison of two values with different enumeration types ('name1::Baz' and 'name2::Baz')}}
OpenPOWER on IntegriCloud