- fix: Alias a namespace to itself will create infinite loop.
This commit is contained in:
parent
396b6f42dc
commit
4f1cc3d50d
1
NEWS.md
1
NEWS.md
|
@ -129,6 +129,7 @@ Red Panda C++ Version 2.27
|
||||||
- change: Completion popup size settings are based on editor's char width/line height.
|
- change: Completion popup size settings are based on editor's char width/line height.
|
||||||
- change: Remove "limit for copy" and "limit for undo" options.
|
- change: Remove "limit for copy" and "limit for undo" options.
|
||||||
- fix: Can't find the correct type if current symbol is member of a class that has constructors.
|
- fix: Can't find the correct type if current symbol is member of a class that has constructors.
|
||||||
|
- fix: Alias a namespace to itself will create infinite loop.
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
- enhancement: Code suggestion for embedded std::vectors.
|
- enhancement: Code suggestion for embedded std::vectors.
|
||||||
|
|
|
@ -3203,20 +3203,23 @@ void CppParser::handleNamespace(KeywordType skipType, int maxIndex)
|
||||||
}
|
}
|
||||||
//qDebug()<<command<<aliasName;
|
//qDebug()<<command<<aliasName;
|
||||||
//namespace alias
|
//namespace alias
|
||||||
addStatement(
|
if (aliasName != command
|
||||||
getCurrentScope(),
|
&& aliasName != getFullStatementName(command, getCurrentScope())) {
|
||||||
mCurrentFile,
|
addStatement(
|
||||||
aliasName, // name of the alias namespace
|
getCurrentScope(),
|
||||||
command, // command
|
mCurrentFile,
|
||||||
"", // args
|
aliasName, // name of the alias namespace
|
||||||
"", // noname args
|
command, // command
|
||||||
"", // values
|
"", // args
|
||||||
//mTokenizer[mIndex]^.Line,
|
"", // noname args
|
||||||
startLine,
|
"", // values
|
||||||
StatementKind::NamespaceAlias,
|
//mTokenizer[mIndex]^.Line,
|
||||||
getScope(),
|
startLine,
|
||||||
mCurrentMemberAccessibility,
|
StatementKind::NamespaceAlias,
|
||||||
StatementProperty::HasDefinition);
|
getScope(),
|
||||||
|
mCurrentMemberAccessibility,
|
||||||
|
StatementProperty::HasDefinition);
|
||||||
|
}
|
||||||
mIndex++; // skip ;
|
mIndex++; // skip ;
|
||||||
return;
|
return;
|
||||||
} else if (isInline) {
|
} else if (isInline) {
|
||||||
|
|
Loading…
Reference in New Issue