fix : crash when parsing fmt/xchar.h

This commit is contained in:
Roy Qu 2024-04-08 11:00:47 +08:00
parent fd0d4d9f26
commit 8ebfeec97d
1 changed files with 4 additions and 4 deletions

View File

@ -4101,8 +4101,8 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic,
PEvalStatement(),
true,false);
if(aliasStatement) {
if (aliasStatement->effectiveTypeStatement) {
addedVar->type = aliasStatement->effectiveTypeStatement->fullName;
if (aliasStatement->typeStatement) {
addedVar->type = aliasStatement->typeStatement->fullName;
if (!addedVar->type.endsWith(">"))
addedVar->type += aliasStatement->templateParams;
if (aliasStatement->typeStatement
@ -4193,8 +4193,8 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic,
PEvalStatement(),
true,false);
if(aliasStatement && aliasStatement->effectiveTypeStatement) {
if (aliasStatement->effectiveTypeStatement) {
addedVar->type = aliasStatement->effectiveTypeStatement->fullName;
if (aliasStatement->typeStatement) {
addedVar->type = aliasStatement->typeStatement->fullName;
if (!addedVar->type.endsWith(">"))
addedVar->type += aliasStatement->templateParams;
if (aliasStatement->typeStatement