aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-04-27 02:00:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-04-27 02:00:13 +0000
commitc08b693e309baa80f0a3dd7794af130c3393c777 (patch)
tree30986154bf0d7997794a5746ca6270df4d53f40c /clang/lib/Parse/ParseDecl.cpp
parent93979f67f8cc49f596ae34c45699371bd3cda785 (diff)
downloadllvm-c08b693e309baa80f0a3dd7794af130c3393c777.zip
llvm-c08b693e309baa80f0a3dd7794af130c3393c777.tar.gz
llvm-c08b693e309baa80f0a3dd7794af130c3393c777.tar.bz2
Parse A::template B as an identifier rather than as a template-id with no
template arguments. This fixes some cases where we'd incorrectly accept "A::template B" when B is a kind of template that requires template arguments (in particular, a variable template or a concept). llvm-svn: 331013
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 3d3abe3..fc0ca61 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -5600,12 +5600,11 @@ void Parser::ParseDirectDeclarator(Declarator &D) {
D.getContext() == DeclaratorContext::MemberContext);
}
- SourceLocation TemplateKWLoc;
bool HadScope = D.getCXXScopeSpec().isValid();
if (ParseUnqualifiedId(D.getCXXScopeSpec(),
/*EnteringContext=*/true,
/*AllowDestructorName=*/true, AllowConstructorName,
- AllowDeductionGuide, nullptr, TemplateKWLoc,
+ AllowDeductionGuide, nullptr, nullptr,
D.getName()) ||
// Once we're past the identifier, if the scope was bad, mark the
// whole declarator bad.