diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-02-28 03:02:23 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-02-28 03:02:23 +0000 |
commit | 77a9c60aa670d262d9bc98fe327067a40c3c2afc (patch) | |
tree | f613992afcd3d40fb8756bcb0e00f0105e7b78d0 /clang/lib/Parse/Parser.cpp | |
parent | c1a40220b4f4983706a4509f0291bb8c2a24b8a1 (diff) | |
download | llvm-77a9c60aa670d262d9bc98fe327067a40c3c2afc.zip llvm-77a9c60aa670d262d9bc98fe327067a40c3c2afc.tar.gz llvm-77a9c60aa670d262d9bc98fe327067a40c3c2afc.tar.bz2 |
Fix a couple of cases where we would fail to correctly parse deduced class template specialization types.
Specifically, we would not properly parse these types within template arguments
(for non-type template parameters), and in tentative parses. Fixing both of
these essentially requires that we parse deduced template specialization types
as types in all contexts, even in template argument lists -- in particular,
tentative parsing may look ahead and annotate a deduced template specialization
type before we figure out that we're actually supposed to treat the tokens as a
template-name. We deal with this by simply permitting deduced template
specialization types when parsing template arguments, and converting them to
template template arguments.
llvm-svn: 326299
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index ce5a479..f617d24 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -1775,8 +1775,8 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(CXXScopeSpec &SS, *Tok.getIdentifierInfo(), Tok.getLocation(), getCurScope(), &SS, false, NextToken().is(tok::period), nullptr, /*IsCtorOrDtorName=*/false, - /*NonTrivialTypeSourceInfo*/ true, - /*IsClassTemplateDeductionContext*/GreaterThanIsOperator)) { + /*NonTrivialTypeSourceInfo*/true, + /*IsClassTemplateDeductionContext*/true)) { SourceLocation BeginLoc = Tok.getLocation(); if (SS.isNotEmpty()) // it was a C++ qualified type name. BeginLoc = SS.getBeginLoc(); |