forked from qt-creator/qt-creator
C++: Do type and name equality checking in a safe manner.
Change the TypeMatcher to also match names, and use two "block" lists in SafeMatcher to prevent infinite recursion. Task-number: QTCREATORBUG-11240 Change-Id: I0367ae795ee6be579b83aeb8d46723c877e4aa75 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
186570a259
commit
b0618281ec
22
src/libs/3rdparty/cplusplus/Symbols.h
vendored
22
src/libs/3rdparty/cplusplus/Symbols.h
vendored
@@ -251,7 +251,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT Enum: public Scope, public Type
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
bool _isScoped;
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
FullySpecifiedType _returnType;
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
bool _isInline;
|
||||
@@ -544,7 +544,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
Key _key;
|
||||
@@ -686,7 +686,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCProtocol: public Scope, public Type
|
||||
@@ -721,7 +721,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
std::vector<ObjCBaseProtocol *> _protocols;
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCClass: public Scope, public Type
|
||||
@@ -798,7 +798,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
const Name *_categoryName;
|
||||
@@ -850,7 +850,7 @@ public:
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const;
|
||||
virtual bool match0(const Type *otherType, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
FullySpecifiedType _returnType;
|
||||
|
||||
Reference in New Issue
Block a user