This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -839,7 +839,11 @@ class CallExpr extends CallOrConversionExpr {
839
839
}
840
840
841
841
/** Gets the expression representing the function being called. */
842
- Expr getCalleeExpr ( ) { result = this .getChildExpr ( 0 ) }
842
+ Expr getCalleeExpr ( ) {
843
+ if this .getChildExpr ( 0 ) instanceof GenericFunctionInstantiationExpr
844
+ then result = this .getChildExpr ( 0 ) .( GenericFunctionInstantiationExpr ) .getBase ( )
845
+ else result = this .getChildExpr ( 0 )
846
+ }
843
847
844
848
/** Gets the `i`th argument expression of this call (0-based). */
845
849
Expr getArgument ( int i ) {
@@ -866,16 +870,11 @@ class CallExpr extends CallOrConversionExpr {
866
870
result = callee .( Ident ) .getName ( )
867
871
or
868
872
result = callee .( SelectorExpr ) .getSelector ( ) .getName ( )
869
- or
870
- result = callee .( GenericFunctionInstantiationExpr ) .getBase ( ) .( Ident ) .getName ( )
871
873
)
872
874
}
873
875
874
876
/** Gets the declared target of this call. */
875
- Function getTarget ( ) {
876
- this .getCalleeExpr ( ) = result .getAReference ( ) or
877
- this .getCalleeExpr ( ) .( GenericFunctionInstantiationExpr ) .getBase ( ) = result .getAReference ( )
878
- }
877
+ Function getTarget ( ) { this .getCalleeExpr ( ) = result .getAReference ( ) }
879
878
880
879
/** Holds if this call has an ellipsis after its last argument. */
881
880
predicate hasEllipsis ( ) { has_ellipsis ( this ) }
You can’t perform that action at this time.
0 commit comments