forked from qt-creator/qt-creator
C++: Fix lambda declarator processing
Now Qt Creator does not warn about lambda declaration with not empty parameters list. Task-number: QTCREATORBUG-6243 Change-Id: I07121a80fbca98c36820d1d8bb1be6e82ab96b12 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
68c843fc35
commit
5be4214b28
8
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
8
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
@@ -1099,7 +1099,12 @@ void Bind::lambdaDeclarator(LambdaDeclaratorAST *ast)
|
||||
return;
|
||||
|
||||
|
||||
Function *fun = 0; // ### implement me
|
||||
Function *fun = control()->newFunction(0, 0);
|
||||
fun->setStartOffset(tokenAt(ast->firstToken()).begin());
|
||||
fun->setEndOffset(tokenAt(ast->lastToken() - 1).end());
|
||||
if (ast->trailing_return_type)
|
||||
_type = this->trailingReturnType(ast->trailing_return_type, _type);
|
||||
fun->setReturnType(_type);
|
||||
|
||||
// unsigned lparen_token = ast->lparen_token;
|
||||
FullySpecifiedType type;
|
||||
@@ -1110,7 +1115,6 @@ void Bind::lambdaDeclarator(LambdaDeclaratorAST *ast)
|
||||
}
|
||||
// unsigned mutable_token = ast->mutable_token;
|
||||
type = this->exceptionSpecification(ast->exception_specification, type);
|
||||
type = this->trailingReturnType(ast->trailing_return_type, type);
|
||||
}
|
||||
|
||||
bool Bind::visit(TrailingReturnTypeAST *ast)
|
||||
|
Reference in New Issue
Block a user