Commit bb7e17ed authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed unused code.

parent 4d8cb395
......@@ -897,15 +897,8 @@ bool ResolveExpression::visit(PostIncrDecrAST *)
////////////////////////////////////////////////////////////////////////////////
ResolveClass::ResolveClass()
: _pointerAccess(false)
{ }
bool ResolveClass::pointerAccess() const
{ return _pointerAccess; }
void ResolveClass::setPointerAccess(bool pointerAccess)
{ _pointerAccess = pointerAccess; }
QList<Symbol *> ResolveClass::operator()(Name *name,
const ResolveExpression::Result &p,
const LookupContext &context)
......@@ -937,16 +930,7 @@ QList<Symbol *> ResolveClass::resolveClass(Name *name,
resolvedSymbols.append(klass);
} else if (candidate->isTypedef()) {
if (Declaration *decl = candidate->asDeclaration()) {
if (_pointerAccess && decl->type()->isPointerType()) {
PointerType *ptrTy = decl->type()->asPointerType();
FullySpecifiedType elementTy = ptrTy->elementType().simplified();
if (NamedType *namedTy = elementTy->asNamedType()) {
_pointerAccess = false;
const ResolveExpression::Result r(elementTy, decl);
resolvedSymbols += resolveClass(namedTy->name(), r, context);
_pointerAccess = true;
}
} else if (Class *asClass = decl->type()->asClassType()) {
if (Class *asClass = decl->type()->asClassType()) {
// typedef struct { } Point;
// Point pt;
// pt.
......
......@@ -130,9 +130,6 @@ class CPLUSPLUS_EXPORT ResolveClass
public:
ResolveClass();
bool pointerAccess() const;
void setPointerAccess(bool pointerAccess);
QList<Symbol *> operator()(Name *name,
const ResolveExpression::Result &p,
const LookupContext &context);
......@@ -144,7 +141,6 @@ private:
private:
QList<ResolveExpression::Result> _blackList;
bool _pointerAccess;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment