Scoped enumerations should not be treated as integer types (in the C
sense). Fixes <rdar://problem/9366066> by eliminating an inconsistency
between C++ overloading (which handled scoped enumerations correctly)
and C binary operator type-checking (which didn't).

llvm-svn: 130924
diff --git a/clang/test/SemaCXX/enum-scoped.cpp b/clang/test/SemaCXX/enum-scoped.cpp
index 8c4bfe7..fc871cf 100644
--- a/clang/test/SemaCXX/enum-scoped.cpp
+++ b/clang/test/SemaCXX/enum-scoped.cpp
@@ -109,3 +109,13 @@
   scoped_enum e = scoped_enum::yes;
   if (e == scoped_enum::no) { }
 }
+
+// <rdar://problem/9366066>
+namespace rdar9366066 {
+  enum class X : unsigned { value };
+
+  void f(X x) {
+    x % X::value; // expected-error{{invalid operands to binary expression ('rdar9366066::X' and 'rdar9366066::X')}}
+    x % 8; // expected-error{{invalid operands to binary expression ('rdar9366066::X' and 'int')}}
+  }
+}