summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
commit53992adde3eda3ccf9da63bc7e45673f043de18f (patch)
tree3558f327a6f9ab59c5d7a06528d84e1560445247 /test/SemaCXX/enum.cpp
parent7e411337c0ed226dace6e07f1420486768161308 (diff)
downloadFreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.zip
FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.tar.gz
Update clang to r104832.
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index dc4a506..bfb5784 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s
-
enum E {
Val1,
Val2
@@ -71,3 +70,12 @@ namespace PR6061 {
namespace Conditional {
enum a { A }; a x(const enum a x) { return 1?x:A; }
}
+
+namespace PR7051 {
+ enum E { e0 };
+ void f() {
+ E e;
+ e = 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}}
+ e |= 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}}
+ }
+}
OpenPOWER on IntegriCloud