diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 331c5e42fdb..720a68c5ba1 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -261,7 +261,7 @@ void Parser::ParseAttributeWithTypeArg(IdentifierInfo &AttrName, 0, AttrNameLoc, 0, 0, AttributeList::AS_GNU); } -void Parser::ParseAttributeArgsCommon( +unsigned Parser::ParseAttributeArgsCommon( IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, AttributeList::Syntax Syntax) { @@ -302,7 +302,7 @@ void Parser::ParseAttributeArgsCommon( ExprResult ArgExpr(ParseAssignmentExpression()); if (ArgExpr.isInvalid()) { SkipUntil(tok::r_paren, StopAtSemi); - return; + return 0; } ArgExprs.push_back(ArgExpr.release()); // Eat the comma, move to the next argument @@ -318,6 +318,8 @@ void Parser::ParseAttributeArgsCommon( if (EndLoc) *EndLoc = RParen; + + return static_cast<unsigned>(ArgExprs.size()); } /// Parse the arguments to a parameterized GNU attribute or |

