Commit 15a67c41 authored by Leandro Melo's avatar Leandro Melo
Browse files

C++: Fix regression when binding qualified names

This was introduced in function extraction refactoring intended
to fix an issue with invalid class names: a66e344b

The patch fixes only the regression itself - the previous fix
is correct.

The report below consists two parts. The other one is not a
regression but nevertheless is fixed by the previous patch.

Task-number: QTCREATORBUG-7730
Change-Id: I6f65584902619b542c9ce56cd0f37218a3d50104
Reviewed-by: default avatarRoberto Raggi <>
parent 11f6ae4a
......@@ -3131,13 +3131,12 @@ void Bind::ensureValidClassName(const Name **name, unsigned sourceLocation)
const QualifiedNameId *qName = (*name)->asQualifiedNameId();
if (qName)
*name = qName->name();
const Name *uqName = qName ? qName->name() : *name;
if (!(*name)->isNameId() && !(*name)->isTemplateNameId()) {
if (!uqName->isNameId() && !uqName->isTemplateNameId()) {
translationUnit()->error(sourceLocation, "expected a class-name");
*name = (*name)->identifier();
*name = uqName->identifier();
if (qName)
*name = control()->qualifiedNameId(qName->base(), *name);
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