Commit 4d07a9bd authored by Roberto Raggi's avatar Roberto Raggi

Simplified CppCheckSymbols.

parent 000e468d
This diff is collapsed.
......@@ -95,20 +95,28 @@ protected:
QByteArray textOf(AST *ast) const;
bool maybeType(const Name *name) const;
bool maybeMember(const Name *name) const;
bool maybeVirtualMethod(const Name *name) const;
void checkName(NameAST *ast, Scope *scope = 0);
void checkNamespace(NameAST *name);
void addUsage(ClassOrNamespace *b, NameAST *ast);
void addUsage(const QList<LookupItem> &candidates, NameAST *ast);
void addUsage(const Use &use);
void checkMemberName(NameAST *ast);
void addMemberUsage(const QList<LookupItem> &candidates, NameAST *ast);
void addVirtualMethodUsage(const QList<LookupItem> &candidates, NameAST *ast, unsigned argumentCount);
void addVirtualMethodUsage(NameAST *ast);
void addUse(const Use &use);
void addUse(NameAST *name, Use::Kind kind);
bool maybeVirtualMethod(const Name *name) const;
void addType(ClassOrNamespace *b, NameAST *ast);
void addType(const QList<LookupItem> &candidates, NameAST *ast);
void addClassMember(const QList<LookupItem> &candidates, NameAST *ast);
void addVirtualMethod(const QList<LookupItem> &candidates, NameAST *ast, unsigned argumentCount);
Scope *enclosingScope() const;
FunctionDefinitionAST *enclosingFunctionDefinition() const;
TemplateDeclarationAST *enclosingTemplateDeclaration() const;
virtual bool preVisit(AST *);
virtual void postVisit(AST *);
virtual bool visit(NamespaceAST *);
virtual bool visit(UsingDirectiveAST *);
......@@ -120,9 +128,6 @@ protected:
virtual bool visit(QualifiedNameAST *ast);
virtual bool visit(TemplateIdAST *ast);
virtual bool visit(TemplateDeclarationAST *ast);
virtual void endVisit(TemplateDeclarationAST *ast);
virtual bool visit(TypenameTypeParameterAST *ast);
virtual bool visit(TemplateTypeParameterAST *ast);
......@@ -134,9 +139,6 @@ protected:
NameAST *declaratorId(DeclaratorAST *ast) const;
unsigned startOfTemplateDeclaration(TemplateDeclarationAST *ast) const;
Scope *findScope(AST *ast) const;
void flush();
private:
......@@ -148,9 +150,7 @@ private:
QSet<QByteArray> _potentialTypes;
QSet<QByteArray> _potentialMembers;
QSet<QByteArray> _potentialVirtualMethods;
QList<ScopedSymbol *> _scopes;
QList<TemplateDeclarationAST *> _templateDeclarationStack;
QList<FunctionDefinitionAST *> _functionDefinitionStack;
QList<AST *> _astStack;
QVector<Use> _usages;
bool _flushRequested;
unsigned _flushLine;
......
......@@ -48,7 +48,7 @@ public:
unsigned length;
unsigned kind;
enum {
enum Kind {
Type = 0,
Local,
Field,
......
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