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
6
src/libs/3rdparty/cplusplus/Name.cpp
vendored
6
src/libs/3rdparty/cplusplus/Name.cpp
vendored
@@ -19,6 +19,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "Literals.h"
|
||||
#include "Matcher.h"
|
||||
#include "Name.h"
|
||||
#include "Names.h"
|
||||
#include "NameVisitor.h"
|
||||
@@ -57,6 +58,11 @@ bool Name::isQualifiedNameId() const
|
||||
bool Name::isSelectorNameId() const
|
||||
{ return asSelectorNameId() != 0; }
|
||||
|
||||
bool Name::match(const Name *name, const Name *otherName, Matcher *matcher)
|
||||
{
|
||||
return Matcher::match(name, otherName, matcher);
|
||||
}
|
||||
|
||||
void Name::accept(NameVisitor *visitor) const
|
||||
{
|
||||
if (visitor->preVisit(this))
|
||||
|
||||
Reference in New Issue
Block a user