Look through sugar when determining whether a type is a scoped enumeration
type. Patch by Stephan Bergmann!

llvm-svn: 225889
diff --git a/clang/test/SemaCXX/enum-scoped.cpp b/clang/test/SemaCXX/enum-scoped.cpp
index 1eed228..9098023 100644
--- a/clang/test/SemaCXX/enum-scoped.cpp
+++ b/clang/test/SemaCXX/enum-scoped.cpp
@@ -301,3 +301,11 @@
   using E::a; // ok!
   E b = a;
 }
+
+namespace test11 {
+  enum class E { a };
+  typedef E E2;
+  E2 f1() { return E::a; }
+
+  bool f() { return !f1(); } // expected-error {{invalid argument type 'E2' (aka 'test11::E') to unary expression}}
+}