diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-31 16:09:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-31 16:09:46 +0000 |
commit | 683a81f4373cf1fa9d41a751dca6f7c36125b058 (patch) | |
tree | a844e923bb00731956d33b25e8cb23d16f40328e /lib/Parse/ParseTemplate.cpp | |
parent | def4e2a405a15eb8381ca305725285d27a4bab65 (diff) |
Implement the suggested resolution to core issue 547, extended to also
allow ref-qualifiers on function types used as template type
arguments. GNU actually allows cv-qualifiers on function types in many
places where it shouldn't, so we currently categorize this as a GNU
extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | lib/Parse/ParseTemplate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index d150260709..e64a933dec 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -992,7 +992,8 @@ ParsedTemplateArgument Parser::ParseTemplateArgument() { // Therefore, we initially try to parse a type-id. if (isCXXTypeId(TypeIdAsTemplateArgument)) { SourceLocation Loc = Tok.getLocation(); - TypeResult TypeArg = ParseTypeName(); + TypeResult TypeArg = ParseTypeName(/*Range=*/0, + Declarator::TemplateTypeArgContext); if (TypeArg.isInvalid()) return ParsedTemplateArgument(); |