From bd654cb71b2b2458fd2feb322af81254539ccb8a Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 17 Jun 2015 07:06:05 +0000 Subject: [PATCH] cpp: typedef issue #914 git-svn-id: svn://ultimatepp.org/upp/trunk@8554 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Cpp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uppsrc/ide/Cpp.cpp b/uppsrc/ide/Cpp.cpp index 651b83d2e..54f6e15f7 100644 --- a/uppsrc/ide/Cpp.cpp +++ b/uppsrc/ide/Cpp.cpp @@ -187,6 +187,11 @@ void AssistEditor::ExpressionType(const String& ttype, const String& usings, String type = ParseTemplatedType(ttype, tparam); int c0 = typeset.GetCount(); const Array& n = GetTypeItems(type); + for(int i = 0; i < n.GetCount(); i++) + if(n[i].kind == TYPEDEF) { + ExpressionType(n[i].qtype, usings, xp, ii, typeset, variable, can_shortcut_operator, visited_bases, lvl + 1); + return; + } String id = xp[ii]; int q = id.ReverseFind(':'); if(q > 0 && id[q - 1] == ':') {