forked from qt-creator/qt-creator
		
	C++: Check for Function::name() before using it
Lambdas do not have a name. Change-Id: Ifda4816c62dcfe19bdbb1649dc1caf408e056b37 Task-number: QTCREATORBUG-12686 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
		@@ -350,13 +350,15 @@ void ResolveExpression::thisObject()
 | 
			
		||||
                FullySpecifiedType ptrTy(control()->pointerType(classTy));
 | 
			
		||||
                addResult(ptrTy, fun->enclosingScope());
 | 
			
		||||
                break;
 | 
			
		||||
            } else if (const QualifiedNameId *q = fun->name()->asQualifiedNameId()) {
 | 
			
		||||
                if (q->base()) {
 | 
			
		||||
                    FullySpecifiedType classTy(control()->namedType(q->base()));
 | 
			
		||||
                    FullySpecifiedType ptrTy(control()->pointerType(classTy));
 | 
			
		||||
                    addResult(ptrTy, fun->enclosingScope());
 | 
			
		||||
            } else if (const Name *name = fun->name()) {
 | 
			
		||||
                if (const QualifiedNameId *q = name->asQualifiedNameId()) {
 | 
			
		||||
                    if (q->base()) {
 | 
			
		||||
                        FullySpecifiedType classTy(control()->namedType(q->base()));
 | 
			
		||||
                        FullySpecifiedType ptrTy(control()->pointerType(classTy));
 | 
			
		||||
                        addResult(ptrTy, fun->enclosingScope());
 | 
			
		||||
                    }
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user