Permalink
Browse files

[NRefactory] Handled invalid calling convention.

  • Loading branch information...
1 parent 217dedf commit 5d3054f0947f07d7804e41a9f8cb024b5ed6bbc0 @mkrueger mkrueger committed May 16, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 main/contrib/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
@@ -445,6 +445,10 @@ void AddAttributes(MethodDefinition methodDefinition, IList<IUnresolvedAttribute
CallingConvention callingConvention;
switch (info.Attributes & PInvokeAttributes.CallConvMask) {
+ case (PInvokeAttributes)0:
+ Console.WriteLine ("Calling convention not set for:" + methodDefinition.FullName);
+ callingConvention = CallingConvention.StdCall;
+ break;
case PInvokeAttributes.CallConvCdecl:
callingConvention = CallingConvention.Cdecl;
break;

0 comments on commit 5d3054f

Please sign in to comment.