Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/rubberduck-vba/Rubberduck i…
Browse files Browse the repository at this point in the history
…nto next
  • Loading branch information
ThunderFrame committed Jun 5, 2016
2 parents 4524329 + b96664e commit 53ffeb5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Rubberduck.Parsing/Symbols/ReferencedDeclarationsCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private string GetTypeName(ITypeInfo info)
string helpFile;
info.GetDocumentation(-1, out typeName, out docString, out helpContext, out helpFile);

return typeName;
return typeName.Equals("LONG_PTR") ? "LongPtr" : typeName; //Quickfix for http://chat.stackexchange.com/transcript/message/30119269#30119269
}

public List<Declaration> GetDeclarationsForReference(Reference reference)
Expand Down Expand Up @@ -350,6 +350,12 @@ public List<Declaration> GetDeclarationsForReference(Reference reference)
var funcValueType = (VarEnum)memberDescriptor.elemdescFunc.tdesc.vt;
var memberDeclarationType = GetDeclarationType(memberName, memberDescriptor, funcValueType, typeKind, parentImplFlags);

if (((FUNCFLAGS)memberDescriptor.wFuncFlags).HasFlag(FUNCFLAGS.FUNCFLAG_FRESTRICTED) &&
IgnoredInterfaceMembers.Contains(memberName)) // Ignore IDispatch and IUnknown members - quick-and-dirty for beta
{
return null;
}

var asTypeName = new ComParameter(string.Empty, false);
if (memberDeclarationType != DeclarationType.Procedure)
{
Expand Down Expand Up @@ -587,8 +593,7 @@ private DeclarationType GetDeclarationType(string memberName, FUNCDESC funcDesc,
memberType = DeclarationType.PropertySet;
}
else if ((parentImplTypeFlags.HasFlag(IMPLTYPEFLAGS.IMPLTYPEFLAG_FSOURCE) ||
((FUNCFLAGS)funcDesc.wFuncFlags).HasFlag(FUNCFLAGS.FUNCFLAG_FSOURCE)) &&
!IgnoredInterfaceMembers.Contains(memberName)) // quick-and-dirty for beta
((FUNCFLAGS)funcDesc.wFuncFlags).HasFlag(FUNCFLAGS.FUNCFLAG_FSOURCE)))
{
memberType = DeclarationType.Event;
}
Expand Down

0 comments on commit 53ffeb5

Please sign in to comment.