Files
codeql/csharp/ql/test/library-tests/arguments/PrintAst.expected

451 lines
19 KiB
Plaintext

arguments.cs:
# 3| [Class] ArgumentsTest
# 5| 4: [InstanceConstructor] ArgumentsTest
#-----| 2: (Parameters)
# 5| 0: [Parameter] x
# 5| -1: [TypeMention] int
# 5| 1: [IntLiteral] 0
# 5| 1: [Parameter] y
# 5| -1: [TypeMention] int
# 5| 1: [IntLiteral] 0
# 6| 4: [BlockStmt] {...}
# 9| 5: [InstanceConstructor] ArgumentsTest
#-----| 2: (Parameters)
# 9| 0: [Parameter] x
# 9| -1: [TypeMention] int
# 9| 1: [Parameter] y
# 9| -1: [TypeMention] int
# 9| 2: [Parameter] z
# 9| -1: [TypeMention] int
# 10| 4: [BlockStmt] {...}
# 11| 0: [ExprStmt] ...;
# 11| 0: [AssignExpr] ... = ...
# 11| 0: [ParameterAccess] access to parameter y
# 11| 1: [ParameterAccess] access to parameter x
# 14| 6: [Method] f1
# 14| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 14| 0: [Parameter] x
# 14| -1: [TypeMention] int
# 14| 1: [IntLiteral] 1
# 14| 1: [Parameter] y
# 14| -1: [TypeMention] int
# 14| 1: [IntLiteral] 2
# 15| 4: [BlockStmt] {...}
# 18| 7: [Method] f2
# 18| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 18| 0: [Parameter] x
# 18| -1: [TypeMention] int
# 18| 1: [Parameter] y
# 18| -1: [TypeMention] int
# 18| 2: [Parameter] z
# 18| -1: [TypeMention] int
# 19| 4: [BlockStmt] {...}
# 20| 0: [ExprStmt] ...;
# 20| 0: [AssignExpr] ... = ...
# 20| 0: [ParameterAccess] access to parameter y
# 20| 1: [ParameterAccess] access to parameter x
# 23| 8: [Method] f
# 23| -1: [TypeMention] Void
# 24| 4: [BlockStmt] {...}
# 25| 0: [LocalVariableDeclStmt] ... ...;
# 25| 0: [LocalVariableDeclAndInitExpr] Int32 x = ...
# 25| -1: [TypeMention] int
# 25| 0: [LocalVariableAccess] access to local variable x
# 25| 1: [IntLiteral] 1
# 27| 1: [ExprStmt] ...;
# 27| 0: [MethodCall] call to method f1
# 27| 0: [IntLiteral] 2
# 28| 2: [ExprStmt] ...;
# 28| 0: [MethodCall] call to method f2
# 28| 0: [LocalVariableAccess] access to local variable x
# 28| 1: [LocalVariableAccess] access to local variable x
# 28| 2: [LocalVariableAccess] access to local variable x
# 29| 3: [ExprStmt] ...;
# 29| 0: [ObjectCreation] object creation of type ArgumentsTest
# 29| -1: [TypeMention] ArgumentsTest
# 29| 0: [LocalVariableAccess] access to local variable x
# 29| 1: [LocalVariableAccess] access to local variable x
# 29| 2: [LocalVariableAccess] access to local variable x
# 30| 4: [ExprStmt] ...;
# 30| 0: [ObjectCreation] object creation of type ArgumentsTest
# 30| -1: [TypeMention] ArgumentsTest
# 30| 0: [IntLiteral] 10
# 30| 1: [IntLiteral] 5
# 33| 9: [Method] f3
# 33| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 33| 0: [Parameter] o
# 33| -1: [TypeMention] int
# 33| 1: [Parameter] args
# 33| -1: [TypeMention] Int32[]
# 33| 1: [TypeMention] int
# 34| 4: [BlockStmt] {...}
# 35| 0: [ExprStmt] ...;
# 35| 0: [MethodCall] call to method f3
# 35| 0: [IntLiteral] 0
# 35| 1: [IntLiteral] 1
# 35| 2: [IntLiteral] 2
# 36| 1: [ExprStmt] ...;
# 36| 0: [MethodCall] call to method f3
# 36| 0: [IntLiteral] 0
# 36| 1: [ArrayCreation] array creation of type Int32[]
# 36| -2: [TypeMention] Int32[]
# 36| 1: [TypeMention] int
# 36| -1: [ArrayInitializer] { ..., ... }
# 36| 0: [IntLiteral] 1
# 36| 1: [IntLiteral] 2
# 37| 2: [ExprStmt] ...;
# 37| 0: [MethodCall] call to method f3
# 37| 0: [IntLiteral] 1
# 37| 1: [IntLiteral] 0
# 38| 3: [ExprStmt] ...;
# 38| 0: [MethodCall] call to method f3
# 38| 0: [IntLiteral] 0
# 38| 1: [ParameterAccess] access to parameter args
# 39| 4: [ExprStmt] ...;
# 39| 0: [MethodCall] call to method f3
# 39| 0: [ParameterAccess] access to parameter args
# 39| 1: [IntLiteral] 0
# 40| 5: [ExprStmt] ...;
# 40| 0: [MethodCall] call to method f3
# 40| 0: [ArrayCreation] array creation of type Int32[]
# 40| -2: [TypeMention] Int32[]
# 40| 1: [TypeMention] int
# 40| -1: [ArrayInitializer] { ..., ... }
# 40| 0: [IntLiteral] 1
# 40| 1: [IntLiteral] 2
# 40| 1: [IntLiteral] 0
# 41| 6: [LocalVariableDeclStmt] ... ...;
# 41| 0: [LocalVariableDeclAndInitExpr] Int16 s1 = ...
# 41| -1: [TypeMention] short
# 41| 0: [LocalVariableAccess] access to local variable s1
# 41| 1: [CastExpr] (...) ...
# 41| 1: [IntLiteral] 1
# 41| 1: [LocalVariableDeclAndInitExpr] Int16 s2 = ...
# 41| -1: [TypeMention] short
# 41| 0: [LocalVariableAccess] access to local variable s2
# 41| 1: [CastExpr] (...) ...
# 41| 1: [IntLiteral] 2
# 42| 7: [ExprStmt] ...;
# 42| 0: [MethodCall] call to method f3
# 42| 0: [IntLiteral] 0
# 42| 1: [CastExpr] (...) ...
# 42| 1: [LocalVariableAccess] access to local variable s1
# 42| 2: [CastExpr] (...) ...
# 42| 1: [LocalVariableAccess] access to local variable s2
# 45| 10: [Method] f4
# 45| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 45| 0: [Parameter] args
# 45| -1: [TypeMention] Object[]
# 45| 1: [TypeMention] object
# 46| 4: [BlockStmt] {...}
# 47| 0: [ExprStmt] ...;
# 47| 0: [MethodCall] call to method f4
# 47| 0: [ArrayCreation] array creation of type Object[]
# 47| -2: [TypeMention] Object[]
# 47| 1: [TypeMention] object
# 47| -1: [ArrayInitializer] { ..., ... }
# 47| 0: [NullLiteral] null
# 47| 1: [NullLiteral] null
# 50| 11: [Property] Prop
# 50| -1: [TypeMention] int
# 50| 3: [Getter] get_Prop
# 50| 4: [Setter] set_Prop
#-----| 2: (Parameters)
# 50| 0: [Parameter] value
# 52| 12: [Indexer] Item
# 52| -1: [TypeMention] int
#-----| 1: (Parameters)
# 52| 0: [Parameter] a
# 52| -1: [TypeMention] int
# 52| 1: [Parameter] b
# 52| -1: [TypeMention] int
# 52| 3: [Getter] get_Item
#-----| 2: (Parameters)
# 52| 0: [Parameter] a
# 52| 1: [Parameter] b
# 52| 4: [AddExpr] ... + ...
# 52| 0: [ParameterAccess] access to parameter a
# 52| 1: [ParameterAccess] access to parameter b
# 52| 4: [Setter] set_Item
#-----| 2: (Parameters)
# 52| 0: [Parameter] a
# 52| 1: [Parameter] b
# 52| 2: [Parameter] value
# 52| 4: [BlockStmt] {...}
# 54| 13: [Method] f5
# 54| -1: [TypeMention] Void
# 55| 4: [BlockStmt] {...}
# 56| 0: [ExprStmt] ...;
# 56| 0: [AssignExpr] ... = ...
# 56| 0: [PropertyCall] access to property Prop
# 56| 1: [IntLiteral] 0
# 57| 1: [ExprStmt] ...;
# 57| 0: [AssignExpr] ... = ...
# 57| 0: [PropertyCall] access to property Prop
# 57| 1: [IndexerCall] access to indexer
# 57| -1: [ThisAccess] this access
# 57| 0: [IntLiteral] 1
# 57| 1: [IntLiteral] 2
# 58| 2: [ExprStmt] ...;
# 58| 0: [AssignExpr] ... = ...
# 58| 0: [TupleExpr] (..., ...)
# 58| 0: [PropertyCall] access to property Prop
# 58| 1: [IndexerCall] access to indexer
# 58| -1: [ThisAccess] this access
# 58| 0: [IntLiteral] 3
# 58| 1: [IntLiteral] 4
# 58| 1: [TupleExpr] (..., ...)
# 58| 0: [IntLiteral] 5
# 58| 1: [IntLiteral] 6
# 59| 3: [ExprStmt] ...;
# 59| 0: [PostIncrExpr] ...++
# 59| 0: [PropertyCall] access to property Prop
# 60| 4: [ExprStmt] ...;
# 60| 0: [AssignAddExpr] ... += ...
# 60| 0: [PropertyCall] access to property Prop
# 60| 1: [IntLiteral] 7
# 61| 5: [ExprStmt] ...;
# 61| 0: [PostIncrExpr] ...++
# 61| 0: [IndexerCall] access to indexer
# 61| -1: [ThisAccess] this access
# 61| 0: [IntLiteral] 8
# 61| 1: [IntLiteral] 9
# 62| 6: [ExprStmt] ...;
# 62| 0: [AssignAddExpr] ... += ...
# 62| 0: [IndexerCall] access to indexer
# 62| -1: [ThisAccess] this access
# 62| 0: [IntLiteral] 10
# 62| 1: [IntLiteral] 11
# 62| 1: [IntLiteral] 12
# 63| 7: [LocalVariableDeclStmt] ... ...;
# 63| 0: [LocalVariableDeclAndInitExpr] (Int32,Int32) tuple = ...
# 63| -1: [TypeMention] (int, int)
# 63| 0: [LocalVariableAccess] access to local variable tuple
# 63| 1: [TupleExpr] (..., ...)
# 63| 0: [IntLiteral] 13
# 63| 1: [IntLiteral] 14
# 64| 8: [ExprStmt] ...;
# 64| 0: [AssignExpr] ... = ...
# 64| 0: [TupleExpr] (..., ...)
# 64| 0: [PropertyCall] access to property Prop
# 64| 1: [IndexerCall] access to indexer
# 64| -1: [ThisAccess] this access
# 64| 0: [IntLiteral] 15
# 64| 1: [IntLiteral] 16
# 64| 1: [LocalVariableAccess] access to local variable tuple
# 68| 14: [Method] f6
# 68| -1: [TypeMention] Void
#-----| 0: (Attributes)
# 67| 1: [DefaultAttribute] [My(...)]
# 67| -1: [TypeMention] MyAttribute
# 67| 0: [BoolLiteral] false
# 68| 4: [BlockStmt] {...}
# 71| 15: [Method] f7
# 71| -1: [TypeMention] Void
#-----| 0: (Attributes)
# 70| 1: [DefaultAttribute] [My(...)]
# 70| -1: [TypeMention] MyAttribute
# 70| 0: [BoolLiteral] true
# 70| 1: [StringLiteralUtf16] ""
# 70| 2: [IntLiteral] 0
# 71| 4: [BlockStmt] {...}
# 73| 17: [Method] f8`1
# 73| -1: [TypeMention] Void
#-----| 1: (Type parameters)
# 73| 0: [TypeParameter] T
#-----| 2: (Parameters)
# 73| 0: [Parameter] o
# 73| -1: [TypeMention] int
# 73| 1: [Parameter] args
# 73| -1: [TypeMention] T[]
# 73| 1: [TypeMention] T
# 74| 4: [BlockStmt] {...}
# 75| 0: [ExprStmt] ...;
# 75| 0: [MethodCall] call to method f8`1
# 75| 0: [IntLiteral] 0
# 75| 1: [ArrayAccess] access to array element
# 75| -1: [ParameterAccess] access to parameter args
# 75| 0: [IntLiteral] 0
# 75| 2: [ArrayAccess] access to array element
# 75| -1: [ParameterAccess] access to parameter args
# 75| 0: [IntLiteral] 1
# 76| 1: [ExprStmt] ...;
# 76| 0: [MethodCall] call to method f8`1
# 76| 0: [IntLiteral] 0
# 76| 1: [ArrayCreation] array creation of type T[]
# 76| -2: [TypeMention] T[]
# 76| 1: [TypeMention] T
# 76| -1: [ArrayInitializer] { ..., ... }
# 76| 0: [ArrayAccess] access to array element
# 76| -1: [ParameterAccess] access to parameter args
# 76| 0: [IntLiteral] 0
# 76| 1: [ArrayAccess] access to array element
# 76| -1: [ParameterAccess] access to parameter args
# 76| 0: [IntLiteral] 1
# 77| 2: [ExprStmt] ...;
# 77| 0: [MethodCall] call to method f8`1
# 77| 0: [IntLiteral] 0
# 77| 1: [ParameterAccess] access to parameter args
# 78| 3: [ExprStmt] ...;
# 78| 0: [MethodCall] call to method f8`1
# 78| 0: [ParameterAccess] access to parameter args
# 78| 1: [IntLiteral] 0
# 80| 4: [ExprStmt] ...;
# 80| 0: [MethodCall] call to method f8<Double>
# 80| 0: [IntLiteral] 0
# 80| 1: [DoubleLiteral] 1.1
# 80| 2: [DoubleLiteral] 2.2
# 81| 5: [ExprStmt] ...;
# 81| 0: [MethodCall] call to method f8<Double>
# 81| 0: [IntLiteral] 0
# 81| 1: [ArrayCreation] array creation of type Double[]
# 81| -2: [TypeMention] Double[]
# 81| 1: [TypeMention] double
# 81| -1: [ArrayInitializer] { ..., ... }
# 81| 0: [DoubleLiteral] 1.1
# 81| 1: [DoubleLiteral] 2.2
# 83| 6: [ExprStmt] ...;
# 83| 0: [MethodCall] call to method f8<Double>
# 83| 0: [IntLiteral] 0
# 83| 1: [CastExpr] (...) ...
# 83| 1: [IntLiteral] 1
# 83| 2: [CastExpr] (...) ...
# 83| 1: [IntLiteral] 2
# 84| 7: [ExprStmt] ...;
# 84| 0: [MethodCall] call to method f8<Double>
# 84| 0: [IntLiteral] 0
# 84| 1: [ArrayCreation] array creation of type Double[]
# 84| -2: [TypeMention] Double[]
# 84| 1: [TypeMention] double
# 84| -1: [ArrayInitializer] { ..., ... }
# 84| 0: [CastExpr] (...) ...
# 84| 1: [IntLiteral] 1
# 84| 1: [CastExpr] (...) ...
# 84| 1: [IntLiteral] 2
# 85| 8: [ExprStmt] ...;
# 85| 0: [MethodCall] call to method f8<Double>
# 85| 0: [IntLiteral] 0
# 85| 1: [ArrayCreation] array creation of type Double[]
# 85| -2: [TypeMention] Double[]
# 85| 1: [TypeMention] double
# 85| -1: [ArrayInitializer] { ..., ... }
# 85| 0: [CastExpr] (...) ...
# 85| 1: [IntLiteral] 1
# 85| 1: [CastExpr] (...) ...
# 85| 1: [IntLiteral] 2
# 89| [Class] MyAttribute
#-----| 3: (Base types)
# 89| 0: [TypeMention] Attribute
# 91| 4: [Field] x
# 91| -1: [TypeMention] int
# 92| 5: [Property] y
# 92| -1: [TypeMention] string
# 92| 3: [Getter] get_y
# 92| 4: [Setter] set_y
#-----| 2: (Parameters)
# 92| 0: [Parameter] value
# 93| 6: [InstanceConstructor] MyAttribute
#-----| 2: (Parameters)
# 93| 0: [Parameter] b
# 93| -1: [TypeMention] bool
# 93| 4: [BlockStmt] {...}
lambdas.cs:
# 3| [Class] LambdaArgumentsTest
# 5| 5: [Method] M1
# 5| -1: [TypeMention] Void
# 6| 4: [BlockStmt] {...}
# 7| 0: [LocalVariableDeclStmt] ... ...;
# 7| 0: [LocalVariableDeclAndInitExpr] Func<Int32,Int32> l1 = ...
# 7| -1: [TypeMention] Func<int, int>
# 7| 0: [LocalVariableAccess] access to local variable l1
# 7| 1: [LambdaExpr] (...) => ...
#-----| 2: (Parameters)
# 7| 0: [Parameter] x
# 7| -1: [TypeMention] int
# 7| 4: [AddExpr] ... + ...
# 7| 0: [ParameterAccess] access to parameter x
# 7| 1: [IntLiteral] 1
# 8| 1: [ExprStmt] ...;
# 8| 0: [DelegateCall] delegate call
# 8| -1: [LocalVariableAccess] access to local variable l1
# 8| 0: [IntLiteral] 1
# 10| 2: [LocalVariableDeclStmt] ... ...;
# 10| 0: [LocalVariableDeclAndInitExpr] <>__AnonType0<> l2 = ...
# 10| -1: [TypeMention] <>__AnonType0<>
# 10| 0: [LocalVariableAccess] access to local variable l2
# 10| 1: [LambdaExpr] (...) => ...
#-----| 2: (Parameters)
# 10| 0: [Parameter] x
# 10| -1: [TypeMention] int
# 10| 1: [Parameter] y
# 10| -1: [TypeMention] int
# 10| 1: [IntLiteral] 1
# 10| 4: [AddExpr] ... + ...
# 10| 0: [ParameterAccess] access to parameter x
# 10| 1: [ParameterAccess] access to parameter y
# 11| 3: [ExprStmt] ...;
# 11| 0: [DelegateCall] delegate call
# 11| -1: [LocalVariableAccess] access to local variable l2
# 11| 0: [IntLiteral] 2
# 11| 1: [IntLiteral] 3
# 12| 4: [ExprStmt] ...;
# 12| 0: [DelegateCall] delegate call
# 12| -1: [LocalVariableAccess] access to local variable l2
# 12| 0: [IntLiteral] 4
# 13| 5: [ExprStmt] ...;
# 13| 0: [DelegateCall] delegate call
# 13| -1: [LocalVariableAccess] access to local variable l2
# 13| 0: [IntLiteral] 5
# 13| 1: [IntLiteral] 6
# 15| 6: [LocalVariableDeclStmt] ... ...;
# 15| 0: [LocalVariableDeclAndInitExpr] <>__AnonType0<> l3 = ...
# 15| -1: [TypeMention] <>__AnonType0<>
# 15| 0: [LocalVariableAccess] access to local variable l3
# 15| 1: [LambdaExpr] (...) => ...
#-----| 2: (Parameters)
# 15| 0: [Parameter] x
# 15| -1: [TypeMention] Int32[]
# 15| 1: [TypeMention] int
# 15| 4: [PropertyCall] access to property Length
# 15| -1: [ParameterAccess] access to parameter x
# 16| 7: [ExprStmt] ...;
# 16| 0: [DelegateCall] delegate call
# 16| -1: [LocalVariableAccess] access to local variable l3
# 17| 8: [ExprStmt] ...;
# 17| 0: [DelegateCall] delegate call
# 17| -1: [LocalVariableAccess] access to local variable l3
# 17| 0: [IntLiteral] 7
# 17| 1: [IntLiteral] 8
# 17| 2: [IntLiteral] 9
# 20| 6: [DelegateType] MyDelegate
#-----| 2: (Parameters)
# 20| 0: [Parameter] x
# 20| -1: [TypeMention] int
# 20| 1: [Parameter] y
# 20| -1: [TypeMention] int
# 22| 7: [Method] M2
# 22| -1: [TypeMention] Void
# 23| 4: [BlockStmt] {...}
# 24| 0: [LocalVariableDeclStmt] ... ...;
# 24| 0: [LocalVariableDeclAndInitExpr] MyDelegate sum = ...
# 24| -1: [TypeMention] MyDelegate
# 24| 0: [LocalVariableAccess] access to local variable sum
# 24| 1: [LambdaExpr] (...) => ...
#-----| 2: (Parameters)
# 24| 0: [Parameter] x
# 24| -1: [TypeMention] int
# 24| 1: [Parameter] y
# 24| -1: [TypeMention] int
# 24| 4: [AddExpr] ... + ...
# 24| 0: [ParameterAccess] access to parameter x
# 24| 1: [ParameterAccess] access to parameter y
# 25| 1: [ExprStmt] ...;
# 25| 0: [DelegateCall] delegate call
# 25| -1: [LocalVariableAccess] access to local variable sum
# 25| 0: [IntLiteral] 4
# 25| 1: [IntLiteral] 5