]> granicus.if.org Git - clang/commit
Implement support for out-of-line definitions of the class members of class
authorDouglas Gregor <dgregor@apple.com>
Wed, 22 Jul 2009 23:48:44 +0000 (23:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 22 Jul 2009 23:48:44 +0000 (23:48 +0000)
commit7cdbc5832084f45721693dfb1d93284c3e08efee
tree1c31b6a6580709273dc40913ee491c7f44e86eaa
parent6016cb2d1e99960675e4c4bb97f6f4ecdff97818
Implement support for out-of-line definitions of the class members of class
templates, e.g.,

  template<typename T>
  struct Outer {
    struct Inner;
  };

  template<typename T>
  struct Outer<T>::Inner {
    // ...
  };

Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.

There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Action.h
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseTemplate.cpp
lib/Sema/Sema.h
lib/Sema/SemaCXXScopeSpec.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplate.cpp
test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp [new file with mode: 0644]
test/Parser/cxx-template-decl.cpp