From 7fa343bb58ff4fb1d3e664951d83ddc3d870b952 Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 12 Nov 2015 14:58:35 +0000 Subject: [PATCH] codetools: support identifier cache for identifiers prefixed with & (e.g. enum values). git-svn-id: trunk@50320 - --- components/codetools/finddeclarationcache.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/codetools/finddeclarationcache.pas b/components/codetools/finddeclarationcache.pas index 42bf421745..38d316fd63 100644 --- a/components/codetools/finddeclarationcache.pas +++ b/components/codetools/finddeclarationcache.pas @@ -574,8 +574,10 @@ var NewEntry: PInterfaceIdentCacheEntry; OldNode: TAVLTreeNode; begin + if (Identifier<>nil) and (Identifier^ = '&') then + Inc(Identifier); if (GetIdentLen(Identifier)=0) then - RaiseCatchableException(''); + raise Exception.Create('TInterfaceIdentifierCache.Add: empty identifier'); //RaiseCatchableException(''); oooooo if FItems=nil then FItems:=TAVLTree.Create(@CompareTInterfaceIdentCacheEntry); OldNode:=FindAVLNode(Identifier);