summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckExpression.cpp
diff options
context:
space:
mode:
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;
+}