C++: Fix crash when handling lambdas as arguments

Proper fix will follow.

Task-number: QTCREATORBUG-8316
Change-Id: I7c86f0b0b0802c310bcce619b5c69ad33ffa0d52
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-03-06 09:54:25 +01:00
parent c663fac20f
commit ad14a46633

View File

@@ -379,6 +379,9 @@ bool Function::maybeValidPrototype(unsigned actualArgumentCount) const
for (; minNumberArguments < this->argumentCount(); ++minNumberArguments) {
Argument *arg = this->argumentAt(minNumberArguments)->asArgument();
if (! arg) // TODO: Fix me properly - QTCREATORBUG-8316
return false;
if (arg->hasInitializer())
break;
}