- 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: 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: Alias a namespace to itself will create infinite loop.
|
||||
|
||||
Red Panda C++ Version 2.26
|
||||
- enhancement: Code suggestion for embedded std::vectors.
|
||||
|
|
|
@ -3203,20 +3203,23 @@ void CppParser::handleNamespace(KeywordType skipType, int maxIndex)
|
|||
}
|
||||
//qDebug()<<command<<aliasName;
|
||||
//namespace alias
|
||||
addStatement(
|
||||
getCurrentScope(),
|
||||
mCurrentFile,
|
||||
aliasName, // name of the alias namespace
|
||||
command, // command
|
||||
"", // args
|
||||
"", // noname args
|
||||
"", // values
|
||||
//mTokenizer[mIndex]^.Line,
|
||||
startLine,
|
||||
StatementKind::NamespaceAlias,
|
||||
getScope(),
|
||||
mCurrentMemberAccessibility,
|
||||
StatementProperty::HasDefinition);
|
||||
if (aliasName != command
|
||||
&& aliasName != getFullStatementName(command, getCurrentScope())) {
|
||||
addStatement(
|
||||
getCurrentScope(),
|
||||
mCurrentFile,
|
||||
aliasName, // name of the alias namespace
|
||||
command, // command
|
||||
"", // args
|
||||
"", // noname args
|
||||
"", // values
|
||||
//mTokenizer[mIndex]^.Line,
|
||||
startLine,
|
||||
StatementKind::NamespaceAlias,
|
||||
getScope(),
|
||||
mCurrentMemberAccessibility,
|
||||
StatementProperty::HasDefinition);
|
||||
}
|
||||
mIndex++; // skip ;
|
||||
return;
|
||||
} else if (isInline) {
|
||||
|
|
Loading…
Reference in New Issue