summaryrefslogtreecommitdiffstats
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.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 31a898cf5a0..3ff9da035fd 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4169,6 +4169,7 @@ void Parser::ParseFunctionDeclaratorIdentifierList(
/// parameter-declaration: [C99 6.7.5]
/// declaration-specifiers declarator
/// [C++] declaration-specifiers declarator '=' assignment-expression
+/// [C++11] initializer-clause
/// [GNU] declaration-specifiers declarator attributes
/// declaration-specifiers abstract-declarator[opt]
/// [C++] declaration-specifiers abstract-declarator[opt]
@@ -4280,7 +4281,11 @@ void Parser::ParseParameterDeclarationClause(
Sema::PotentiallyEvaluatedIfUsed,
Param);
- ExprResult DefArgResult(ParseAssignmentExpression());
+ ExprResult DefArgResult;
+ if (Tok.is(tok::l_brace))
+ DefArgResult = ParseBraceInitializer();
+ else
+ DefArgResult = ParseAssignmentExpression();
if (DefArgResult.isInvalid()) {
Actions.ActOnParamDefaultArgumentError(Param);
SkipUntil(tok::comma, tok::r_paren, true, true);
OpenPOWER on IntegriCloud