Code quality improvement

This commit is contained in:
Tamas Vajk
2021-01-15 08:33:48 +01:00
parent 613bf6dca6
commit f7a0c98cb3
2 changed files with 2 additions and 8 deletions

View File

@@ -136,7 +136,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
private static bool IsDelegateLikeCall(ExpressionNodeInfo info)
{
return IsDelegateLikeCall(info, IsDelegateLikeCall);
return IsDelegateLikeCall(info, symbol => IsFunctionPointer(symbol) || IsDelegateInvoke(symbol));
}
private static bool IsDelegateInvokeCall(ExpressionNodeInfo info)
@@ -167,12 +167,6 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
return check(si.Symbol);
}
private static bool IsDelegateLikeCall(ISymbol symbol)
{
return IsFunctionPointer(symbol) ||
IsDelegateInvoke(symbol);
}
private static bool IsFunctionPointer(ISymbol symbol)
{
return symbol != null &&

View File

@@ -805,6 +805,7 @@ private newtype TCallingConvention =
* signature are passed from the caller to the callee.
*/
class CallingConvention extends TCallingConvention {
/** Gets a textual representation of this calling convention. */
string toString() { result = "CallingConvention" }
}
@@ -853,7 +854,6 @@ class VarArgsCallingConvention extends CallingConvention {
override string toString() { result = "VarArgsCallingConvention" }
}
// Add sub classes
/**
* A function pointer type, for example
*