summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckExpression.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-03-24 12:54:25 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2010-03-24 13:49:02 +0100
commit8329d7db943bef3f7929d3802fc31f60e314e179 (patch)
treedabef77315dda11ce9f01250e788a4b5e044a9a4 /src/shared/cplusplus/CheckExpression.cpp
parent35be3a9f6c916ddb087628d66bb4bb4e76a1daa5 (diff)
downloadqt-creator-8329d7db943bef3f7929d3802fc31f60e314e179.tar.gz
Recognize C++0x lambda expressions.
Diffstat (limited to 'src/shared/cplusplus/CheckExpression.cpp')
-rw-r--r--src/shared/cplusplus/CheckExpression.cpp11
1 files changed, 11 insertions, 0 deletions
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;
+}