aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index d7942fa..5a65a23 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -449,10 +449,8 @@ unsigned Parser::ParseAttributeArgsCommon(
? Sema::ExpressionEvaluationContext::Unevaluated
: Sema::ExpressionEvaluationContext::ConstantEvaluated);
- CommaLocsTy CommaLocs;
ExprVector ParsedExprs;
- if (ParseExpressionList(ParsedExprs, CommaLocs,
- llvm::function_ref<void()>(),
+ if (ParseExpressionList(ParsedExprs, llvm::function_ref<void()>(),
/*FailImmediatelyOnInvalidExpr=*/true,
/*EarlyTypoCorrection=*/true)) {
SkipUntil(tok::r_paren, StopAtSemi);
@@ -2499,7 +2497,6 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
T.consumeOpen();
ExprVector Exprs;
- CommaLocsTy CommaLocs;
InitializerScopeRAII InitScope(*this, D, ThisDecl);
@@ -2524,7 +2521,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
// ProduceConstructorSignatureHelp only on VarDecls.
ExpressionStarts = SetPreferredType;
}
- if (ParseExpressionList(Exprs, CommaLocs, ExpressionStarts)) {
+ if (ParseExpressionList(Exprs, ExpressionStarts)) {
if (ThisVarDecl && PP.isCodeCompletionReached() && !CalledSignatureHelp) {
Actions.ProduceConstructorSignatureHelp(
ThisVarDecl->getType()->getCanonicalTypeInternal(),
@@ -2537,10 +2534,6 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
} else {
// Match the ')'.
T.consumeClose();
-
- assert(!Exprs.empty() && Exprs.size()-1 == CommaLocs.size() &&
- "Unexpected number of commas!");
-
InitScope.pop();
ExprResult Initializer = Actions.ActOnParenListExpr(T.getOpenLocation(),