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
7
src/libs/3rdparty/cplusplus/Names.h
vendored
7
src/libs/3rdparty/cplusplus/Names.h
vendored
@@ -48,6 +48,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
const Name *_base;
|
||||
@@ -71,6 +72,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
const Name *_name;
|
||||
@@ -115,6 +117,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
const Identifier *_identifier;
|
||||
@@ -194,6 +197,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
Kind _kind;
|
||||
@@ -215,6 +219,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
FullySpecifiedType _type;
|
||||
@@ -247,6 +252,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
std::vector<const Name *> _names;
|
||||
@@ -269,6 +275,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void accept0(NameVisitor *visitor) const;
|
||||
virtual bool match0(const Name *otherName, Matcher *matcher) const;
|
||||
|
||||
private:
|
||||
unsigned _classTokenIndex;
|
||||
|
||||
Reference in New Issue
Block a user