]> granicus.if.org Git - clang/commit
In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type...
authorFrancois Pichet <pichet2000@gmail.com>
Wed, 13 Apr 2011 02:38:49 +0000 (02:38 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Wed, 13 Apr 2011 02:38:49 +0000 (02:38 +0000)
commit6943e9befee204becfae55de1298b3d5fee87934
treec0640128f27b36579cf4343aaf5b4e6647d32a14
parentad3692bbe1874abafae1757a2b9d3bfa2249dc43
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
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
test/SemaCXX/MicrosoftExtensions.cpp