aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-11 00:45:18 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-11 00:45:18 +0000
commit4f3018eceac9cc32966e50ee900d8559efcaea21 (patch)
tree0af8a07f8cce2561b008fd81a1f052c87a3716ff
parentbc61bd8109d9accf8f966b59e3f16a1497e72adf (diff)
Make sure that we parse a '>>' that closes two template argument lists
appropritely when there are no other template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123204 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Parse/ParseTemplate.cpp2
-rw-r--r--test/CXX/temp/temp.param/p15-cxx0x.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp
index aeafba8990..93f5c9ba43 100644
--- a/lib/Parse/ParseTemplate.cpp
+++ b/lib/Parse/ParseTemplate.cpp
@@ -677,7 +677,7 @@ Parser::ParseTemplateIdAfterTemplateName(TemplateTy Template,
bool Invalid = false;
{
GreaterThanIsOperatorScope G(GreaterThanIsOperator, false);
- if (Tok.isNot(tok::greater))
+ if (Tok.isNot(tok::greater) && Tok.isNot(tok::greatergreater))
Invalid = ParseTemplateArgumentList(TemplateArgs);
if (Invalid) {
diff --git a/test/CXX/temp/temp.param/p15-cxx0x.cpp b/test/CXX/temp/temp.param/p15-cxx0x.cpp
index 0ce669979c..f4be5b960b 100644
--- a/test/CXX/temp/temp.param/p15-cxx0x.cpp
+++ b/test/CXX/temp/temp.param/p15-cxx0x.cpp
@@ -20,3 +20,5 @@ void f(const X<int> x) {
X<X<int>> *x1;
}
+template<typename T = void> struct X1 { };
+X1<X1<>> x1a;