From 8ebfeec97dbbc65eca1b0be2acdca1ab0eec6975 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 8 Apr 2024 11:00:47 +0800 Subject: [PATCH] fix : crash when parsing fmt/xchar.h --- RedPandaIDE/parser/cppparser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index d5e8db7b..3325d1c9 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -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