]> granicus.if.org Git - clang/commit
Implement C++ DR481, which clarifies that the scope of template
authorDouglas Gregor <dgregor@apple.com>
Thu, 1 Jul 2010 00:00:45 +0000 (00:00 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 1 Jul 2010 00:00:45 +0000 (00:00 +0000)
commitbb3310a5fd9c08741b5272ed2665bdeab76a99a6
tree567270e7c70485ee0c11fc30009c3c260c9399cf
parent424b6613a9e5631d61c4c8ed2f1601457b64bfd4
Implement C++ DR481, which clarifies that the scope of template
parameters starts at the end of the template-parameter rather than at
the point where the template parameter name is encounted. For example,
given:

  typedef unsigned char T;
  template<typename T = T> struct X0 { };

The "T" in the default argument refers to the typedef of "unsigned
char", rather than referring to the newly-introduced template type
parameter 'T'.

Addresses <rdar://problem/8122812>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/Action.h
include/clang/Parse/Template.h
lib/Parse/ParseTemplate.cpp
lib/Sema/Sema.h
lib/Sema/SemaTemplate.cpp