You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cpp/ql/test/library-tests/ir/ir/PrintAST.expected
+260-1Lines changed: 260 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6876,7 +6876,121 @@ ir.cpp:
6876
6876
# 1027| Type = int
6877
6877
# 1027| Value = 4
6878
6878
# 1027| ValueCategory = prvalue
6879
-
# 1028| 10: return ...
6879
+
# 1028| 10: declaration
6880
+
# 1028| 0: definition of lambda_mixed_explicit
6881
+
# 1028| Type = decltype([...](...){...})
6882
+
# 1028| init: initializer for lambda_mixed_explicit
6883
+
# 1028| expr: [...](...){...}
6884
+
# 1028| Type = decltype([...](...){...})
6885
+
# 1028| ValueCategory = prvalue
6886
+
# 1028| 0: {...}
6887
+
# 1028| Type = decltype([...](...){...})
6888
+
# 1028| ValueCategory = prvalue
6889
+
# 1028| .s: (reference to)
6890
+
# 1028| Type = const String &
6891
+
# 1028| ValueCategory = prvalue
6892
+
# 1028| expr: (reference dereference)
6893
+
# 1028| Type = const String
6894
+
# 1028| ValueCategory = lvalue
6895
+
# 1028| expr: s
6896
+
# 1028| Type = const String &
6897
+
# 1028| ValueCategory = prvalue(load)
6898
+
# 1028| .x: x
6899
+
# 1028| Type = int
6900
+
# 1028| ValueCategory = prvalue(load)
6901
+
# 1029| 11: ExprStmt
6902
+
# 1029| 0: call to operator()
6903
+
# 1029| Type = char
6904
+
# 1029| ValueCategory = prvalue
6905
+
# 1029| -1: (const lambda [] type at line 1028, col. 32)...
6906
+
# 1029| Conversion = glvalue conversion
6907
+
# 1029| Type = const lambda [] type at line 1028, col. 32
6908
+
# 1029| ValueCategory = lvalue
6909
+
# 1029| expr: lambda_mixed_explicit
6910
+
# 1029| Type = decltype([...](...){...})
6911
+
# 1029| ValueCategory = lvalue
6912
+
# 1029| 0: (float)...
6913
+
# 1029| Conversion = integral to floating point conversion
6914
+
# 1029| Type = float
6915
+
# 1029| Value = 5.0
6916
+
# 1029| ValueCategory = prvalue
6917
+
# 1029| expr: 5
6918
+
# 1029| Type = int
6919
+
# 1029| Value = 5
6920
+
# 1029| ValueCategory = prvalue
6921
+
# 1030| 12: declaration
6922
+
# 1030| 0: definition of r
6923
+
# 1030| Type = int
6924
+
# 1030| init: initializer for r
6925
+
# 1030| expr: ... - ...
6926
+
# 1030| Type = int
6927
+
# 1030| ValueCategory = prvalue
6928
+
# 1030| 0: x
6929
+
# 1030| Type = int
6930
+
# 1030| ValueCategory = prvalue(load)
6931
+
# 1030| 1: 1
6932
+
# 1030| Type = int
6933
+
# 1030| Value = 1
6934
+
# 1030| ValueCategory = prvalue
6935
+
# 1031| 13: declaration
6936
+
# 1031| 0: definition of lambda_inits
6937
+
# 1031| Type = decltype([...](...){...})
6938
+
# 1031| init: initializer for lambda_inits
6939
+
# 1031| expr: [...](...){...}
6940
+
# 1031| Type = decltype([...](...){...})
6941
+
# 1031| ValueCategory = prvalue
6942
+
# 1031| 0: {...}
6943
+
# 1031| Type = decltype([...](...){...})
6944
+
# 1031| ValueCategory = prvalue
6945
+
# 1031| .s: (reference to)
6946
+
# 1031| Type = const String &
6947
+
# 1031| ValueCategory = prvalue
6948
+
# 1031| expr: (reference dereference)
6949
+
# 1031| Type = const String
6950
+
# 1031| ValueCategory = lvalue
6951
+
# 1031| expr: s
6952
+
# 1031| Type = const String &
6953
+
# 1031| ValueCategory = prvalue(load)
6954
+
# 1031| .x: x
6955
+
# 1031| Type = int
6956
+
# 1031| ValueCategory = prvalue(load)
6957
+
# 1031| .i: ... + ...
6958
+
# 1031| Type = int
6959
+
# 1031| ValueCategory = prvalue
6960
+
# 1031| 0: x
6961
+
# 1031| Type = int
6962
+
# 1031| ValueCategory = prvalue(load)
6963
+
# 1031| 1: 1
6964
+
# 1031| Type = int
6965
+
# 1031| Value = 1
6966
+
# 1031| ValueCategory = prvalue
6967
+
# 1031| .j: (reference to)
6968
+
# 1031| Type = int &
6969
+
# 1031| ValueCategory = prvalue
6970
+
# 1031| expr: r
6971
+
# 1031| Type = int
6972
+
# 1031| ValueCategory = lvalue
6973
+
# 1032| 14: ExprStmt
6974
+
# 1032| 0: call to operator()
6975
+
# 1032| Type = char
6976
+
# 1032| ValueCategory = prvalue
6977
+
# 1032| -1: (const lambda [] type at line 1031, col. 23)...
6978
+
# 1032| Conversion = glvalue conversion
6979
+
# 1032| Type = const lambda [] type at line 1031, col. 23
6980
+
# 1032| ValueCategory = lvalue
6981
+
# 1032| expr: lambda_inits
6982
+
# 1032| Type = decltype([...](...){...})
6983
+
# 1032| ValueCategory = lvalue
6984
+
# 1032| 0: (float)...
6985
+
# 1032| Conversion = integral to floating point conversion
6986
+
# 1032| Type = float
6987
+
# 1032| Value = 6.0
6988
+
# 1032| ValueCategory = prvalue
6989
+
# 1032| expr: 6
6990
+
# 1032| Type = int
6991
+
# 1032| Value = 6
6992
+
# 1032| ValueCategory = prvalue
6993
+
# 1033| 15: return ...
6880
6994
# 1018| (void Lambda(int, String const&))::(lambda [] type at line 1018, col. 23)& (void Lambda(int, String const&))::(lambda [] type at line 1018, col. 23)::operator=((void Lambda(int, String const&))::(lambda [] type at line 1018, col. 23) const&)
6881
6995
# 1018| params:
6882
6996
#-----| 0: p#0
@@ -7148,3 +7262,148 @@ ir.cpp:
7148
7262
# 1026| Type = int
7149
7263
# 1026| Value = 0
7150
7264
# 1026| ValueCategory = prvalue
7265
+
# 1028| (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)& (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)::operator=((void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32) const&)
7266
+
# 1028| params:
7267
+
#-----| 0: p#0
7268
+
#-----| Type = const lambda [] type at line 1028, col. 32 &
7269
+
# 1028| void (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)::(constructor)((void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32) const&)
7270
+
# 1028| params:
7271
+
#-----| 0: p#0
7272
+
#-----| Type = const lambda [] type at line 1028, col. 32 &
7273
+
# 1028| void (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)::(constructor)((void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)&&)
7274
+
# 1028| params:
7275
+
#-----| 0: p#0
7276
+
#-----| Type = lambda [] type at line 1028, col. 32 &&
7277
+
# 1028| initializations:
7278
+
# 1028| 0: constructor init of field s
7279
+
# 1028| Type = const String &
7280
+
# 1028| ValueCategory = prvalue
7281
+
# 1028| 0: Unknown literal
7282
+
# 1028| Type = const String &
7283
+
# 1028| ValueCategory = prvalue
7284
+
# 1028| 1: constructor init of field x
7285
+
# 1028| Type = int
7286
+
# 1028| ValueCategory = prvalue
7287
+
# 1028| 0: Unknown literal
7288
+
# 1028| Type = int
7289
+
# 1028| ValueCategory = prvalue
7290
+
# 1028| body: { ... }
7291
+
# 1028| 0: return ...
7292
+
# 1028| void (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)::(constructor)()
7293
+
# 1028| params:
7294
+
# 1028| char (void Lambda(int, String const&))::(lambda [] type at line 1028, col. 32)::operator()(float) const
7295
+
# 1028| params:
7296
+
# 1028| 0: f
7297
+
# 1028| Type = float
7298
+
# 1028| body: { ... }
7299
+
# 1028| 0: return ...
7300
+
# 1028| 0: access to array
7301
+
# 1028| Type = char
7302
+
# 1028| ValueCategory = prvalue(load)
7303
+
# 1028| 0: call to c_str
7304
+
# 1028| Type = const char *
7305
+
# 1028| ValueCategory = prvalue
7306
+
# 1028| -1: (reference dereference)
7307
+
# 1028| Type = const String
7308
+
# 1028| ValueCategory = lvalue
7309
+
#-----| expr: s
7310
+
#-----| Type = const String &
7311
+
#-----| ValueCategory = prvalue(load)
7312
+
#-----| -1: this
7313
+
#-----| Type = const lambda [] type at line 1028, col. 32 *
7314
+
#-----| ValueCategory = prvalue(load)
7315
+
#-----| 1: x
7316
+
#-----| Type = int
7317
+
#-----| ValueCategory = prvalue(load)
7318
+
#-----| -1: this
7319
+
#-----| Type = const lambda [] type at line 1028, col. 32 *
7320
+
#-----| ValueCategory = prvalue(load)
7321
+
# 1031| (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)& (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)::operator=((void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23) const&)
7322
+
# 1031| params:
7323
+
#-----| 0: p#0
7324
+
#-----| Type = const lambda [] type at line 1031, col. 23 &
7325
+
# 1031| void (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)::(constructor)((void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23) const&)
7326
+
# 1031| params:
7327
+
#-----| 0: p#0
7328
+
#-----| Type = const lambda [] type at line 1031, col. 23 &
7329
+
# 1031| void (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)::(constructor)((void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)&&)
7330
+
# 1031| params:
7331
+
#-----| 0: p#0
7332
+
#-----| Type = lambda [] type at line 1031, col. 23 &&
7333
+
# 1031| initializations:
7334
+
# 1031| 0: constructor init of field s
7335
+
# 1031| Type = const String &
7336
+
# 1031| ValueCategory = prvalue
7337
+
# 1031| 0: Unknown literal
7338
+
# 1031| Type = const String &
7339
+
# 1031| ValueCategory = prvalue
7340
+
# 1031| 1: constructor init of field x
7341
+
# 1031| Type = int
7342
+
# 1031| ValueCategory = prvalue
7343
+
# 1031| 0: Unknown literal
7344
+
# 1031| Type = int
7345
+
# 1031| ValueCategory = prvalue
7346
+
# 1031| 2: constructor init of field i
7347
+
# 1031| Type = int
7348
+
# 1031| ValueCategory = prvalue
7349
+
# 1031| 0: Unknown literal
7350
+
# 1031| Type = int
7351
+
# 1031| ValueCategory = prvalue
7352
+
# 1031| 3: constructor init of field j
7353
+
# 1031| Type = int &
7354
+
# 1031| ValueCategory = prvalue
7355
+
# 1031| 0: Unknown literal
7356
+
# 1031| Type = int &
7357
+
# 1031| ValueCategory = prvalue
7358
+
# 1031| body: { ... }
7359
+
# 1031| 0: return ...
7360
+
# 1031| void (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)::(constructor)()
7361
+
# 1031| params:
7362
+
# 1031| char (void Lambda(int, String const&))::(lambda [] type at line 1031, col. 23)::operator()(float) const
7363
+
# 1031| params:
7364
+
# 1031| 0: f
7365
+
# 1031| Type = float
7366
+
# 1031| body: { ... }
7367
+
# 1031| 0: return ...
7368
+
# 1031| 0: access to array
7369
+
# 1031| Type = char
7370
+
# 1031| ValueCategory = prvalue(load)
7371
+
# 1031| 0: call to c_str
7372
+
# 1031| Type = const char *
7373
+
# 1031| ValueCategory = prvalue
7374
+
# 1031| -1: (reference dereference)
7375
+
# 1031| Type = const String
7376
+
# 1031| ValueCategory = lvalue
7377
+
#-----| expr: s
7378
+
#-----| Type = const String &
7379
+
#-----| ValueCategory = prvalue(load)
7380
+
#-----| -1: this
7381
+
#-----| Type = const lambda [] type at line 1031, col. 23 *
7382
+
#-----| ValueCategory = prvalue(load)
7383
+
# 1031| 1: ... - ...
7384
+
# 1031| Type = int
7385
+
# 1031| ValueCategory = prvalue
7386
+
# 1031| 0: ... + ...
7387
+
# 1031| Type = int
7388
+
# 1031| ValueCategory = prvalue
7389
+
#-----| 0: x
7390
+
#-----| Type = int
7391
+
#-----| ValueCategory = prvalue(load)
7392
+
#-----| -1: this
7393
+
#-----| Type = const lambda [] type at line 1031, col. 23 *
7394
+
#-----| ValueCategory = prvalue(load)
7395
+
# 1031| 1: i
7396
+
# 1031| Type = int
7397
+
# 1031| ValueCategory = prvalue(load)
7398
+
#-----| -1: this
7399
+
#-----| Type = const lambda [] type at line 1031, col. 23 *
7400
+
#-----| ValueCategory = prvalue(load)
7401
+
# 1031| 1: (reference dereference)
7402
+
# 1031| Type = int
7403
+
# 1031| ValueCategory = prvalue(load)
7404
+
# 1031| expr: j
7405
+
# 1031| Type = int &
7406
+
# 1031| ValueCategory = prvalue(load)
7407
+
#-----| -1: this
7408
+
#-----| Type = const lambda [] type at line 1031, col. 23 *
0 commit comments