mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Code quality improvement
This commit is contained in:
@@ -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 &&
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user