aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorSaar Raz <saar@raz.email>2020-01-18 14:58:01 +0200
committerSaar Raz <saar@raz.email>2020-01-18 14:58:01 +0200
commitbaa84d8cde940278d6fb37917ac0d64c127b528f (patch)
treec5be4e4061c59594ba6e2c2dc60a92b71d5d0329 /clang/lib/Parse/ParseDecl.cpp
parent69bc450882fc6a3066e9fe79f68106376bbef569 (diff)
downloadllvm-baa84d8cde940278d6fb37917ac0d64c127b528f.zip
llvm-baa84d8cde940278d6fb37917ac0d64c127b528f.tar.gz
llvm-baa84d8cde940278d6fb37917ac0d64c127b528f.tar.bz2
Revert "[Concepts] Requires Expressions"
This reverts commit 027931899763409e2c61a84bdee6057b5e838ffa. There have been some failing tests on some platforms, reverting while investigating.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 178cb1b..192c0e9 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -6366,7 +6366,7 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
ProhibitAttributes(FnAttrs);
} else {
if (Tok.isNot(tok::r_paren))
- ParseParameterDeclarationClause(D.getContext(), FirstArgAttrs, ParamInfo,
+ ParseParameterDeclarationClause(D, FirstArgAttrs, ParamInfo,
EllipsisLoc);
else if (RequiresArg)
Diag(Tok, diag::err_argument_required_after_attribute);
@@ -6584,9 +6584,9 @@ void Parser::ParseFunctionDeclaratorIdentifierList(
/// after the opening parenthesis. This function will not parse a K&R-style
/// identifier list.
///
-/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs
-/// is non-null, then the caller parsed those attributes immediately after the
-/// open paren - they should be considered to be part of the first parameter.
+/// D is the declarator being parsed. If FirstArgAttrs is non-null, then the
+/// caller parsed those arguments immediately after the open paren - they should
+/// be considered to be part of the first parameter.
///
/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will
/// be the location of the ellipsis, if any was parsed.
@@ -6612,7 +6612,7 @@ void Parser::ParseFunctionDeclaratorIdentifierList(
/// [C++11] attribute-specifier-seq parameter-declaration
///
void Parser::ParseParameterDeclarationClause(
- DeclaratorContext DeclaratorContext,
+ Declarator &D,
ParsedAttributes &FirstArgAttrs,
SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo,
SourceLocation &EllipsisLoc) {
@@ -6661,11 +6661,9 @@ void Parser::ParseParameterDeclarationClause(
// "LambdaExprParameterContext", because we must accept either
// 'declarator' or 'abstract-declarator' here.
Declarator ParmDeclarator(
- DS, DeclaratorContext == DeclaratorContext::RequiresExprContext
- ? DeclaratorContext::RequiresExprContext
- : DeclaratorContext == DeclaratorContext::LambdaExprContext
- ? DeclaratorContext::LambdaExprParameterContext
- : DeclaratorContext::PrototypeContext);
+ DS, D.getContext() == DeclaratorContext::LambdaExprContext
+ ? DeclaratorContext::LambdaExprParameterContext
+ : DeclaratorContext::PrototypeContext);
ParseDeclarator(ParmDeclarator);
// Parse GNU attributes, if present.
@@ -6719,7 +6717,7 @@ void Parser::ParseParameterDeclarationClause(
SourceLocation EqualLoc = Tok.getLocation();
// Parse the default argument
- if (DeclaratorContext == DeclaratorContext::MemberContext) {
+ if (D.getContext() == DeclaratorContext::MemberContext) {
// If we're inside a class definition, cache the tokens
// corresponding to the default argument. We'll actually parse
// them when we see the end of the class definition.