History log of /external/clang/test/SemaTemplate/issue150.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8e8fb3be5bd78f0564444eca02b404566a5f3b5d 19-Oct-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp
5875038f5c333b8bd013f62950281618d08e36a8 05-Mar-2011 Douglas Gregor <dgregor@apple.com> When substituting in for a template name, do not produce a qualified
template name as the result of substitution. The qualifier is handled
separately by the tree transformer, so we would end up in an
inconsistent state.

This is actually the last bit of PR9016, and possibly also fixes
PR8965. It takes Boost.Icl from "epic fail" down to a single failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp
c494f77363f057dd8619fec4e885c4f80e3d1b66 05-Mar-2011 Douglas Gregor <dgregor@apple.com> When determining template instantiation arguments within a function
template (not a specialization!), use the "injected" function template
arguments, which correspond to the template parameters of the function
template. This is required when substituting into the default template
parameters of template template parameters within a function template.

Fixes PR9016.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp
0b4bcb639a9aab9c466a9e6d6e61b3bd1bb36d68 05-Mar-2011 Douglas Gregor <dgregor@apple.com> When transforming a substituted template type parameter, try to
transform the type that replaces the template type parameter. In the
vast majority of cases, there's nothing to do, because most template
type parameters are replaced with something non-dependent that doesn't
need further transformation. However, when we're dealing with the
default template arguments of template template parameters, we might
end up replacing a template parameter (of the template template
parameter) with a template parameter of the enclosing template.

This addresses part of PR9016, but not within function
templates. That's a separate issue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp
9a299e0575ce235f491014627c7267e2d2cd73de 04-Mar-2011 Douglas Gregor <dgregor@apple.com> Make sure to put template parameters into their owning template's
DeclContext once we've created it. This mirrors what we do for
function parameters, where the parameters start out with
translation-unit context and then are adopted by the appropriate
DeclContext when it is created. Also give template parameters public
access and make sure that they don't show up for the purposes of name
lookup.

Fixes PR9400, a regression introduced by r126920, which implemented
substitution of default template arguments provided in template
template parameters (C++ core issue 150).

How on earth could the DeclContext of a template parameter affect the
handling of default template arguments?

I'm so glad you asked! The link is
Sema::getTemplateInstantiationArgs(), which determines the outer
template argument lists that correspond to a given declaration. When
we're instantiating a default template argument for a template
template parameter within the body of a template definition (not it's
instantiation, per core issue 150), we weren't getting any outer
template arguments because the context of the template template
parameter was the translation unit. Now that the context of the
template template parameter is its owning template, we get the
template arguments from the injected-class-name of the owning
template, so substitution works as it should.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp
67714230a191bc3c01f33378f34f34ef377991a6 03-Mar-2011 Douglas Gregor <dgregor@apple.com> When we use the default template arguments of a template template
parameter, save the instantiated default template arguments along with
the explicitly-specified template argument list. That way, we prefer
the default template template arguments corresponding to the template
template parameter rather than those of its template template argument.

This addresses the likely direction of C++ core issue 150, and fixes
PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of
EDG and GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/issue150.cpp