In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange!
This fixes 1 error when parsing the MSVC 2008 header files.
Example:

template<class T> class A {
public:
  typedef int TYPE;
};
template<class T> class B : public A<T> {
public:
  A<T>::TYPE a; // no typename required because A<T> is a base class.
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129425 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/MicrosoftExtensions.cpp b/test/SemaCXX/MicrosoftExtensions.cpp
index 2287d26..c2a32b4 100644
--- a/test/SemaCXX/MicrosoftExtensions.cpp
+++ b/test/SemaCXX/MicrosoftExtensions.cpp
@@ -136,3 +136,35 @@
 template <class T>
 void BB<T>::f(int g = 0) { } // expected-warning {{redefinition of default argument}}
 
+
+namespace MissingTypename {
+
+template<class T> class A {
+public:
+	 typedef int TYPE;
+};
+
+template<class T> class B {
+public:
+	 typedef int TYPE;
+};
+
+
+template<class T, class U>
+class C : private A<T>, public B<U> {
+public:
+   typedef A<T> Base1;
+   typedef B<U> Base2;
+   typedef A<U> Base3;
+
+   A<T>::TYPE a1; // expected-warning {{missing 'typename' prior to dependent type name}}
+   Base1::TYPE a2; // expected-warning {{missing 'typename' prior to dependent type name}}
+
+   B<U>::TYPE a3; // expected-warning {{missing 'typename' prior to dependent type name}}
+   Base2::TYPE a4; // expected-warning {{missing 'typename' prior to dependent type name}}
+
+   A<U>::TYPE a5; // expected-error {{missing 'typename' prior to dependent type name}}
+   Base3::TYPE a6; // expected-error {{missing 'typename' prior to dependent type name}}
+ };
+
+}
\ No newline at end of file