]> granicus.if.org Git - clang/commit
Fix a couple of cases where we would fail to correctly parse deduced class template...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 28 Feb 2018 03:02:23 +0000 (03:02 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 28 Feb 2018 03:02:23 +0000 (03:02 +0000)
commit6ba4f924d92bc11dc5c9c79892a16a769dbfb7ab
tree06bb078e415b95b55fa25fabb8957cb3eb231138
parent5a983b00e82645ae99f45211c4fa1c1d547b230e
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326299 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/DeclSpec.h
include/clang/Sema/Sema.h
lib/AST/TemplateName.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseTemplate.cpp
lib/Parse/ParseTentative.cpp
lib/Parse/Parser.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaType.cpp
test/CXX/temp/temp.deduct.guide/p3.cpp
test/Parser/cxx1z-class-template-argument-deduction.cpp