forked from qt-creator/qt-creator
		
	Recursive definition of CPlusPlus::QualifiedNameId.
Done-with: Erik Verbruggen
This commit is contained in:
		@@ -221,11 +221,10 @@ bool ResolveExpression::visit(NewExpressionAST *ast)
 | 
			
		||||
 | 
			
		||||
bool ResolveExpression::visit(TypeidExpressionAST *)
 | 
			
		||||
{
 | 
			
		||||
    const Name *std_type_info[2];
 | 
			
		||||
    std_type_info[0] = control()->nameId(control()->findOrInsertIdentifier("std"));
 | 
			
		||||
    std_type_info[1] = control()->nameId(control()->findOrInsertIdentifier("type_info"));
 | 
			
		||||
    const Name *stdName = control()->nameId(control()->findOrInsertIdentifier("std"));
 | 
			
		||||
    const Name *tiName = control()->nameId(control()->findOrInsertIdentifier("type_info"));
 | 
			
		||||
    const Name *q = control()->qualifiedNameId(control()->qualifiedNameId(/* :: */ 0, stdName), tiName);
 | 
			
		||||
 | 
			
		||||
    const Name *q = control()->qualifiedNameId(std_type_info, 2, /*global=*/ true);
 | 
			
		||||
    FullySpecifiedType ty(control()->namedType(q));
 | 
			
		||||
    addResult(ty, _scope);
 | 
			
		||||
 | 
			
		||||
@@ -314,14 +313,11 @@ void ResolveExpression::thisObject()
 | 
			
		||||
                addResult(ptrTy, fun->scope());
 | 
			
		||||
                break;
 | 
			
		||||
            } else if (const QualifiedNameId *q = fun->name()->asQualifiedNameId()) {
 | 
			
		||||
                const Name *nestedNameSpecifier = 0;
 | 
			
		||||
                if (q->nameCount() == 1 && q->isGlobal())
 | 
			
		||||
                    nestedNameSpecifier = q->nameAt(0);
 | 
			
		||||
                else
 | 
			
		||||
                    nestedNameSpecifier = control()->qualifiedNameId(q->names(), q->nameCount() - 1);
 | 
			
		||||
                FullySpecifiedType classTy(control()->namedType(nestedNameSpecifier));
 | 
			
		||||
                FullySpecifiedType ptrTy(control()->pointerType(classTy));
 | 
			
		||||
                addResult(ptrTy, fun->scope());
 | 
			
		||||
                if (q->base()) {
 | 
			
		||||
                    FullySpecifiedType classTy(control()->namedType(q->base()));
 | 
			
		||||
                    FullySpecifiedType ptrTy(control()->pointerType(classTy));
 | 
			
		||||
                    addResult(ptrTy, fun->scope());
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user