diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-03-14 15:54:00 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-03-14 15:54:00 +0000 |
commit | db63af2216eba7e98463546b1c32359fe8d8ea18 (patch) | |
tree | 6b564f0c979459b398c9fae0cb8a7f33428c6b64 /clang/lib/Parse/ParseCXXInlineMethods.cpp | |
parent | fe66dd624dd1c65340d0211981e87712e17ba8e9 (diff) | |
download | bcm5719-llvm-db63af2216eba7e98463546b1c32359fe8d8ea18.tar.gz bcm5719-llvm-db63af2216eba7e98463546b1c32359fe8d8ea18.zip |
Parse brace initializers as default arguments. PR12236.
llvm-svn: 152721
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index 7ee74ecc769..8a6e1ce33f3 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -319,7 +319,11 @@ void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { Sema::PotentiallyEvaluatedIfUsed, LM.DefaultArgs[I].Param); - ExprResult DefArgResult(ParseAssignmentExpression()); + ExprResult DefArgResult; + if (Tok.is(tok::l_brace)) + DefArgResult = ParseBraceInitializer(); + else + DefArgResult = ParseAssignmentExpression(); if (DefArgResult.isInvalid()) Actions.ActOnParamDefaultArgumentError(LM.DefaultArgs[I].Param); else { |