@@ -126,7 +126,7 @@ class Node extends TIRDataFlowNode {
126126 /**
127127 * INTERNAL: Do not use.
128128 */
129- DataFlowCallable getEnclosingCallable ( ) { none ( ) } // overridden in subclasses
129+ Declaration getEnclosingCallable ( ) { none ( ) } // overridden in subclasses
130130
131131 /** Gets the function to which this node belongs, if any. */
132132 Declaration getFunction ( ) { none ( ) } // overridden in subclasses
@@ -479,7 +479,7 @@ private class Node0 extends Node, TNode0 {
479479
480480 Node0 ( ) { this = TNode0 ( node ) }
481481
482- override DataFlowCallable getEnclosingCallable ( ) { result = node .getEnclosingCallable ( ) }
482+ override Declaration getEnclosingCallable ( ) { result = node .getEnclosingCallable ( ) }
483483
484484 override Declaration getFunction ( ) { result = node .getFunction ( ) }
485485
@@ -544,7 +544,7 @@ class PostUpdateNodeImpl extends PartialDefinitionNode, TPostUpdateNodeImpl {
544544
545545 override Declaration getFunction ( ) { result = operand .getUse ( ) .getEnclosingFunction ( ) }
546546
547- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
547+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
548548
549549 /** Gets the operand associated with this node. */
550550 Operand getOperand ( ) { result = operand }
@@ -597,7 +597,7 @@ class SsaPhiNode extends Node, TSsaPhiNode {
597597 /** Gets the phi node associated with this node. */
598598 Ssa:: PhiNode getPhiNode ( ) { result = phi }
599599
600- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
600+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
601601
602602 override Declaration getFunction ( ) { result = phi .getBasicBlock ( ) .getEnclosingFunction ( ) }
603603
@@ -666,7 +666,7 @@ class SideEffectOperandNode extends Node instanceof IndirectOperand {
666666
667667 int getArgumentIndex ( ) { result = argumentIndex }
668668
669- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
669+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
670670
671671 override Declaration getFunction ( ) { result = call .getEnclosingFunction ( ) }
672672
@@ -687,7 +687,7 @@ class FinalGlobalValue extends Node, TFinalGlobalValue {
687687 /** Gets the underlying SSA use. */
688688 Ssa:: GlobalUse getGlobalUse ( ) { result = globalUse }
689689
690- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
690+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
691691
692692 override Declaration getFunction ( ) { result = globalUse .getIRFunction ( ) .getFunction ( ) }
693693
@@ -717,7 +717,7 @@ class InitialGlobalValue extends Node, TInitialGlobalValue {
717717 /** Gets the underlying SSA definition. */
718718 Ssa:: GlobalDef getGlobalDef ( ) { result = globalDef }
719719
720- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
720+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
721721
722722 override Declaration getFunction ( ) { result = globalDef .getIRFunction ( ) .getFunction ( ) }
723723
@@ -756,8 +756,8 @@ class FlowSummaryNode extends Node, TFlowSummaryNode {
756756 /**
757757 * TODO: QLDoc.
758758 */
759- override DataFlowCallable getEnclosingCallable ( ) {
760- result = TSummarizedCallable ( this .getSummarizedCallable ( ) ) // TODO: this doesn't look right.
759+ override Declaration getEnclosingCallable ( ) {
760+ result = this .getSummarizedCallable ( ) // TODO: this doesn't look right.
761761 }
762762
763763 override Location getLocationImpl ( ) { result = this .getSummarizedCallable ( ) .getLocation ( ) }
@@ -780,7 +780,7 @@ class IndirectParameterNode extends Node instanceof IndirectInstruction {
780780 /** Gets the parameter whose indirection is initialized. */
781781 Parameter getParameter ( ) { result = init .getParameter ( ) }
782782
783- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
783+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
784784
785785 override Declaration getFunction ( ) { result = init .getEnclosingFunction ( ) }
786786
@@ -815,7 +815,7 @@ class IndirectReturnNode extends Node {
815815 .hasOperandAndIndirectionIndex ( any ( ReturnValueInstruction ret ) .getReturnAddressOperand ( ) , _)
816816 }
817817
818- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
818+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
819819
820820 /**
821821 * Holds if this node represents the value that is returned to the caller
@@ -1013,8 +1013,8 @@ private module RawIndirectNodes {
10131013 result = this .getOperand ( ) .getDef ( ) .getEnclosingFunction ( )
10141014 }
10151015
1016- override DataFlowCallable getEnclosingCallable ( ) {
1017- result = TSourceCallable ( this .getFunction ( ) )
1016+ override Declaration getEnclosingCallable ( ) {
1017+ result = this .getFunction ( )
10181018 }
10191019
10201020 override predicate isGLValue ( ) { this .getOperand ( ) .isGLValue ( ) }
@@ -1059,8 +1059,8 @@ private module RawIndirectNodes {
10591059
10601060 override Declaration getFunction ( ) { result = this .getInstruction ( ) .getEnclosingFunction ( ) }
10611061
1062- override DataFlowCallable getEnclosingCallable ( ) {
1063- result = TSourceCallable ( this .getFunction ( ) )
1062+ override Declaration getEnclosingCallable ( ) {
1063+ result = this .getFunction ( )
10641064 }
10651065
10661066 override predicate isGLValue ( ) { this .getInstruction ( ) .isGLValue ( ) }
@@ -1161,7 +1161,7 @@ class FinalParameterNode extends Node, TFinalParameterNode {
11611161
11621162 override Declaration getFunction ( ) { result = p .getFunction ( ) }
11631163
1164- override DataFlowCallable getEnclosingCallable ( ) { result = TSourceCallable ( this .getFunction ( ) ) }
1164+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
11651165
11661166 override DataFlowType getType ( ) { result = getTypeImpl ( p .getUnderlyingType ( ) , indirectionIndex ) }
11671167
@@ -1737,7 +1737,7 @@ private predicate indirectParameterNodeHasArgumentIndexAndIndex(
17371737/** A synthetic parameter to model the pointed-to object of a pointer parameter. */
17381738class ParameterIndirectionNode extends ParameterNode instanceof IndirectParameterNode {
17391739 override predicate isParameterOf ( DataFlowCallable f , ParameterPosition pos ) {
1740- IndirectParameterNode .super .getEnclosingCallable ( ) = f and
1740+ IndirectParameterNode .super .getEnclosingCallable ( ) = f . getUnderlyingCallable ( ) and
17411741 exists ( int argumentIndex , int indirectionIndex |
17421742 indirectPositionHasArgumentIndexAndIndex ( pos , argumentIndex , indirectionIndex ) and
17431743 indirectParameterNodeHasArgumentIndexAndIndex ( this , argumentIndex , indirectionIndex )
@@ -1842,13 +1842,13 @@ class VariableNode extends Node, TVariableNode {
18421842
18431843 override Declaration getFunction ( ) { none ( ) }
18441844
1845- override DataFlowCallable getEnclosingCallable ( ) {
1845+ override Declaration getEnclosingCallable ( ) {
18461846 // When flow crosses from one _enclosing callable_ to another, the
18471847 // interprocedural data-flow library discards call contexts and inserts a
18481848 // node in the big-step relation used for human-readable path explanations.
18491849 // Therefore we want a distinct enclosing callable for each `VariableNode`,
18501850 // and that can be the `Variable` itself.
1851- result = TSourceCallable ( v )
1851+ result = v
18521852 }
18531853
18541854 override DataFlowType getType ( ) {
0 commit comments