Commit 57520c44 authored by Christian Kamm's avatar Christian Kamm
Browse files

TestPlugin: Fix crash with non-identifier qualified names.

Think Foo::operator+().

Change-Id: I0c8d7d4d8b952b405652d0c26b16d7a9da2e419c
Reviewed-on: http://codereview.qt.nokia.com/3739

Reviewed-by: default avatarChristian Kamm <christian.d.kamm@nokia.com>
parent 94d034b8
...@@ -181,7 +181,7 @@ protected: ...@@ -181,7 +181,7 @@ protected:
{ {
if (symbol->name()) { if (symbol->name()) {
const CPlusPlus::QualifiedNameId *qn = symbol->name()->asQualifiedNameId(); const CPlusPlus::QualifiedNameId *qn = symbol->name()->asQualifiedNameId();
if (qn && qn->base()) { if (qn && qn->base() && qn->base()->identifier() && qn->name() && qn->name()->identifier()) {
QString name = QString::fromLatin1("%1::%2").arg(qn->base()->identifier()->chars()) QString name = QString::fromLatin1("%1::%2").arg(qn->base()->identifier()->chars())
.arg(qn->name()->identifier()->chars()); .arg(qn->name()->identifier()->chars());
if (m_knownTestFunctions.contains(name)) if (m_knownTestFunctions.contains(name))
......
Supports Markdown
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