llvm-project/clang/lib/Parse
Douglas Gregor e861bac059 Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

  template<typename X> template<typename Y>
  X Outer<X>::Inner1<Y>::foo(Y) {
    return X();
  }

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.

llvm-svn: 80044
2009-08-25 22:51:20 +00:00
..
AttributeList.cpp map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return 2009-08-09 20:07:29 +00:00
CMakeLists.txt Reorder files. 2009-07-21 21:03:50 +00:00
DeclSpec.cpp Keep track of the right paren ')' source location in a function declarator. 2009-08-19 23:14:54 +00:00
ExtensionRAIIObject.h Rejigger how -pedantic and -pedantic-errors work and their interaction 2009-04-15 07:01:18 +00:00
Makefile Don't install Clang libraries. 2009-08-23 05:02:18 +00:00
MinimalAction.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00
ParseCXXInlineMethods.cpp Make sure to adjust function template declarations to their templated 2009-08-24 11:57:43 +00:00
ParseDecl.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00
ParseDeclCXX.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00
ParseExpr.cpp Keep track of the right paren ')' source location in a function declarator. 2009-08-19 23:14:54 +00:00
ParseExprCXX.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00
ParseInit.cpp Merge the ASTVector and ASTOwningVector templates, since they offered 2009-05-21 16:25:11 +00:00
ParseObjc.cpp Fix a clang crash caused by incorrect user code. 2009-06-24 17:00:18 +00:00
ParsePragma.cpp Per advice that Doug Gregor gave me several months ago, clean up the 2009-08-03 23:24:57 +00:00
ParsePragma.h Add parser support for #pragma weak. 2009-06-05 00:49:58 +00:00
ParseStmt.cpp Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed. 2009-08-18 16:11:00 +00:00
ParseTemplate.cpp Keep track of the template parameter depth properly when we have 2009-08-24 23:03:25 +00:00
ParseTentative.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00
Parser.cpp Improve support for out-of-line definitions of nested templates and 2009-08-25 22:51:20 +00:00