reject 'int test(x, x) int x; {}'

llvm-svn: 49271
This commit is contained in:
Chris Lattner 2008-04-06 06:50:56 +00:00
parent 67b450cb48
commit 285a3e47be
2 changed files with 3 additions and 0 deletions

View File

@ -1400,6 +1400,7 @@ void Parser::ParseFunctionDeclaratorIdentifierList(SourceLocation LParenLoc,
// Tok is known to be the first identifier in the list. Remember this
// identifier in ParamInfo.
ParamsSoFar.insert(Tok.getIdentifierInfo());
ParamInfo.push_back(DeclaratorChunk::ParamInfo(Tok.getIdentifierInfo(),
Tok.getLocation(), 0));

View File

@ -30,3 +30,5 @@ int test3(x,
atype /* expected-error {{unexpected type name 'atype': expected identifier}} */
) int x, atype; {}
int test4(x, x) int x; {} /* expected-error {{redefinition of parameter 'x'}} */