Skip to content

Commit cf9c3d5

Browse files
committed
C#: Remove un-needed code as we extract synthetic default constructors.
1 parent 14de39a commit cf9c3d5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ private import semmle.code.csharp.frameworks.system.collections.Generic
2020
*/
2121
DotNet::Callable getCallableForDataFlow(DotNet::Callable c) {
2222
exists(DotNet::Callable unboundDecl | unboundDecl = c.getUnboundDeclaration() |
23-
(
24-
result.hasBody()
25-
or
26-
// take synthesized bodies into account, e.g. implicit constructors
27-
// with field initializer assignments
28-
result = any(ControlFlow::Nodes::ElementNode n).getEnclosingCallable()
29-
) and
23+
result.hasBody() and
3024
if unboundDecl.getFile().fromSource()
3125
then
3226
// C# callable with C# implementation in the database

0 commit comments

Comments
 (0)