mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
C#: Remove un-needed code as we extract synthetic default constructors.
This commit is contained in:
@@ -20,13 +20,7 @@ private import semmle.code.csharp.frameworks.system.collections.Generic
|
||||
*/
|
||||
DotNet::Callable getCallableForDataFlow(DotNet::Callable c) {
|
||||
exists(DotNet::Callable unboundDecl | unboundDecl = c.getUnboundDeclaration() |
|
||||
(
|
||||
result.hasBody()
|
||||
or
|
||||
// take synthesized bodies into account, e.g. implicit constructors
|
||||
// with field initializer assignments
|
||||
result = any(ControlFlow::Nodes::ElementNode n).getEnclosingCallable()
|
||||
) and
|
||||
result.hasBody() and
|
||||
if unboundDecl.getFile().fromSource()
|
||||
then
|
||||
// C# callable with C# implementation in the database
|
||||
|
||||
Reference in New Issue
Block a user