From 8329d7db943bef3f7929d3802fc31f60e314e179 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Wed, 24 Mar 2010 12:54:25 +0100 Subject: Recognize C++0x lambda expressions. --- src/shared/cplusplus/CheckExpression.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/shared/cplusplus/CheckExpression.cpp') diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp index ecbf991c9a..42f1d85a71 100644 --- a/src/shared/cplusplus/CheckExpression.cpp +++ b/src/shared/cplusplus/CheckExpression.cpp @@ -388,8 +388,19 @@ bool CheckExpression::visit(ObjCEncodeExpressionAST * /*ast*/) bool CheckExpression::visit(ObjCSelectorExpressionAST *ast) { + if (_scope->isPrototypeScope()) + return false; + (void) semantic()->check(ast->selector, _scope); return false; } +bool CheckExpression::visit(LambdaExpressionAST *ast) +{ + if (_scope->isPrototypeScope()) + return false; + + (void) semantic()->check(ast->statement, _scope); + return false; +} -- cgit v1.2.1