diff options
Diffstat (limited to 'test/SemaCXX/compare.cpp')
-rw-r--r-- | test/SemaCXX/compare.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/SemaCXX/compare.cpp b/test/SemaCXX/compare.cpp index c76efe92ba..5771912590 100644 --- a/test/SemaCXX/compare.cpp +++ b/test/SemaCXX/compare.cpp @@ -1,7 +1,7 @@ // Force x86-64 because some of our heuristics are actually based // on integer sizes. -// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare -std=c++11 %s int test0(long a, unsigned long b) { enum EnumA {A}; @@ -348,3 +348,10 @@ void test8(int x) { (void)((E)x == 1); (void)((E)x == -1); } + +void test9(int x) { + enum E : int { + Positive = 1 + }; + (void)((E)x == 1); +} |