From c83da8309c33699cfa5ccc99fc7cc68bf2de9855 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 2 Jun 2024 17:53:31 +0800 Subject: [PATCH] - fix: Variables defined by using alias can't show completion info. --- NEWS.md | 1 + RedPandaIDE/parser/cppparser.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index c1783f5c..82bbedba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,7 @@ Red Panda C++ Version 3.1 - enhancement: More elements in the demo of editor color theme optiont page. - fix: Mingw32-make doesn't work correctly if there are bash in the path. - fix: All color scheme names are incorrectly displayed as bold, if the current one is a customed one. + - fix: Variables defined by using alias can't show completion info. Red Panda C++ Version 3.0 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 39251297..84bea986 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -5937,7 +5937,8 @@ PStatement CppParser::doParseEvalTypeInfo( PStatement effectiveTypeStatement = typeStatement; int level=0; while (effectiveTypeStatement && (effectiveTypeStatement->kind == StatementKind::Typedef - || effectiveTypeStatement->kind == StatementKind::Preprocessor)) { + || effectiveTypeStatement->kind == StatementKind::Alias + || effectiveTypeStatement->kind == StatementKind::Preprocessor)) { if (level >20) // prevent infinite loop break; level++;