hanchenye-llvm-project/clang/docs
Douglas Gregor 7f74112756 Implement parsing of nested-name-specifiers that involve template-ids, e.g.,
std::vector<int>::allocator_type

When we parse a template-id that names a type, it will become either a
template-id annotation (which is a parsed representation of a
template-id that has not yet been through semantic analysis) or a
typename annotation (where semantic analysis has resolved the
template-id to an actual type), depending on the context. We only
produce a type in contexts where we know that we only need type
information, e.g., in a type specifier. Otherwise, we create a
template-id annotation that can later be "upgraded" by transforming it
into a typename annotation when the parser needs a type. This occurs,
for example, when we've parsed "std::vector<int>" above and then see
the '::' after it. However, it means that when writing something like
this:

  template<> class Outer::Inner<int> { ... };

We have two tokens to represent Outer::Inner<int>: one token for the
nested name specifier Outer::, and one template-id annotation token
for Inner<int>, which will be passed to semantic analysis to define
the class template specialization.

Most of the churn in the template tests in this patch come from an
improvement in our error recovery from ill-formed template-ids.

llvm-svn: 65467
2009-02-25 19:37:18 +00:00
..
InternalsManual.html Implement parsing of nested-name-specifiers that involve template-ids, e.g., 2009-02-25 19:37:18 +00:00
LanguageExtensions.html fix typo 2009-02-18 22:27:46 +00:00
Makefile Unbreak clang install. 2008-08-12 00:32:59 +00:00
doxygen.cfg Add doxygen support 2008-07-26 21:32:24 +00:00
doxygen.cfg.in Add doxygen support 2008-07-26 21:32:24 +00:00
doxygen.css Add the right path to the lines image. 2008-07-26 23:51:08 +00:00
doxygen.footer clean up the footer a bit more. 2008-07-26 23:54:49 +00:00
doxygen.header Add doxygen support 2008-07-26 21:32:24 +00:00
doxygen.intro Add doxygen support 2008-07-26 21:32:24 +00:00
index.html add documentation skeleton 2007-07-24 18:03:18 +00:00