summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-template-decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-25 22:08:12 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-25 22:08:12 +0000
commitad3f2fcf43eb7dc680728aca5b5c6d257928d04e (patch)
treef9189c2a4e765338cbaa6f09ac992bcddb02d08b /clang/test/Parser/cxx-template-decl.cpp
parent7e687191fd9aee421df32e51a7afded58b2a1b90 (diff)
downloadbcm5719-llvm-ad3f2fcf43eb7dc680728aca5b5c6d257928d04e.tar.gz
bcm5719-llvm-ad3f2fcf43eb7dc680728aca5b5c6d257928d04e.zip
Improved semantic analysis and AST respresentation for function
templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. llvm-svn: 74213
Diffstat (limited to 'clang/test/Parser/cxx-template-decl.cpp')
-rw-r--r--clang/test/Parser/cxx-template-decl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-template-decl.cpp b/clang/test/Parser/cxx-template-decl.cpp
index aaf3ee77a36..69550187909 100644
--- a/clang/test/Parser/cxx-template-decl.cpp
+++ b/clang/test/Parser/cxx-template-decl.cpp
@@ -33,8 +33,8 @@ template <typename = int> class X2;
// Forward declarations w/template template parameters
template <template <typename> class T> class TTP1;
template <template <typename> class> class TTP2;
-template <template <typename> class T = foo> class TTP3; // FIXME:expected-error{{template argument for template template parameter must be a template}}
-template <template <typename> class = foo> class TTP3; // FIXME:expected-error{{template argument for template template parameter must be a template}}
+template <template <typename> class T = foo> class TTP3; // expected-error{{must be a class template}}
+template <template <typename> class = foo> class TTP3; // expected-error{{must be a class template}}
template <template <typename X, typename Y> class T> class TTP5;
// Forward declarations with non-type params
OpenPOWER on IntegriCloud