-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathsemmlecode.cpp.dbscheme
More file actions
1111 lines (913 loc) · 32.7 KB
/
semmlecode.cpp.dbscheme
File metadata and controls
1111 lines (913 loc) · 32.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* External artifacts
*/
externalDefects(
unique int id : @externalDefect,
varchar(900) queryPath : string ref,
int location : @location_default ref,
varchar(900) message : string ref,
float severity : float ref
);
externalMetrics(
unique int id : @externalMetric,
varchar(900) queryPath : string ref,
int location : @location_default ref,
float value : float ref
);
externalData(
int id : @externalDataElement,
varchar(900) path : string ref,
int column: int ref,
varchar(900) value : string ref
);
snapshotDate(unique date snapshotDate : date ref);
sourceLocationPrefix(varchar(900) prefix : string ref);
/*
* Duplicate code
*/
duplicateCode(
unique int id : @duplication,
varchar(900) relativePath : string ref,
int equivClass : int ref);
similarCode(
unique int id : @similarity,
varchar(900) relativePath : string ref,
int equivClass : int ref);
@duplication_or_similarity = @duplication | @similarity
tokens(
int id : @duplication_or_similarity ref,
int offset : int ref,
int beginLine : int ref,
int beginColumn : int ref,
int endLine : int ref,
int endColumn : int ref);
/*
* Version history
*/
svnentries(
int id : @svnentry,
varchar(500) revision : string ref,
varchar(500) author : string ref,
date revisionDate : date ref,
int changeSize : int ref
)
svnaffectedfiles(
int id : @svnentry ref,
int file : @file ref,
varchar(500) action : string ref
)
svnentrymsg(
int id : @svnentry ref,
varchar(500) message : string ref
)
svnchurn(
int commit : @svnentry ref,
int file : @file ref,
int churnedLines : int ref
)
/*
* C++ dbscheme
*/
@location = @location_stmt | @location_expr | @location_default ;
locations_default(unique int id: @location_default,
int file: @file ref,
int beginLine: int ref,
int beginColumn: int ref,
int endLine: int ref,
int endColumn: int ref);
locations_stmt(unique int id: @location_stmt,
int file: @file ref,
int beginLine: int ref,
int beginColumn: int ref,
int endLine: int ref,
int endColumn: int ref);
locations_expr(unique int id: @location_expr,
int file: @file ref,
int beginLine: int ref,
int beginColumn: int ref,
int endLine: int ref,
int endColumn: int ref);
@sourceline = @file | @function | @variable | @enumconstant;
numlines(unique int element_id: @sourceline ref,
int num_lines: int ref,
int num_code: int ref,
int num_comment: int ref
);
diagnostics(unique int id: @diagnostic,
int severity: int ref,
varchar(900) error_tag: string ref,
varchar(900) error_message: string ref,
int location: @location_default ref);
/*
fromSource(0) = unknown,
fromSource(1) = from source,
fromSource(2) = from library
*/
files(unique int id: @file,
varchar(900) name: string ref,
varchar(900) simple: string ref,
varchar(900) ext: string ref,
int fromSource: int ref);
folders(unique int id: @folder,
varchar(900) name: string ref,
varchar(900) simple: string ref);
@container = @folder | @file
containerparent(int parent: @container ref,
unique int child: @container ref);
fileannotations(int id: @file ref,
int kind: int ref,
varchar(900) name: string ref,
varchar(900) value: string ref);
inmacroexpansion(int id: @element ref,
int inv: @macroinvocation ref);
macroinvocations(unique int id: @macroinvocation,
int macro_id: @ppd_define ref,
int location: @location_default ref);
macroparent(unique int id: @macroinvocation ref,
int parent_id: @macroinvocation ref);
// a macroinvocation may be part of another location
// the way to find a constant expression that uses a macro
// is thus to find a constant expression that has a location
// to which a macro invocation is bound
macrolocationbind(int id: @macroinvocation ref,
int location: @location ref);
/*
case @function.kind of
1 = normal
| 2 = constructor
| 3 = destructor
| 4 = conversion
| 5 = operator
| 6 = builtin // GCC built-in functions, e.g. __builtin___memcpy_chk
;
*/
functions(unique int id: @function,
varchar(900) name: string ref,
int kind: int ref);
function_return_type(int id: @function ref, int return_type: @type ref);
purefunctions(unique int id: @function ref);
fun_decls(unique int id: @fun_decl,
int function: @function ref,
int type_id: @type ref,
varchar(900) name: string ref,
int location: @location_default ref);
fun_def(unique int id: @fun_decl ref);
fun_decl_specifiers(int id: @fun_decl ref,
varchar(900) name: string ref)
fun_decl_throws(int fun_decl: @fun_decl ref,
int index: int ref,
int type_id: @type ref);
/* an empty throw specification is different from none */
fun_decl_empty_throws(unique int fun_decl: @fun_decl ref);
fun_decl_noexcept(int fun_decl: @fun_decl ref,
int constant: @expr ref);
fun_decl_empty_noexcept(int fun_decl: @fun_decl ref);
fun_decl_typedef_type(unique int fun_decl: @fun_decl ref,
int typedeftype_id: @usertype ref);
param_decl_bind(unique int id: @var_decl ref,
int index: int ref,
int fun_decl: @fun_decl ref);
var_decls(unique int id: @var_decl,
int variable: @variable ref,
int type_id: @type ref,
varchar(900) name: string ref,
int location: @location_default ref);
var_def(unique int id: @var_decl ref);
var_decl_specifiers(int id: @var_decl ref,
varchar(900) name: string ref)
type_decls(unique int id: @type_decl,
int type_id: @type ref,
int location: @location_default ref);
type_def(unique int id: @type_decl ref);
type_decl_specifiers(int id: @type_decl ref,
varchar(900) name: string ref)
namespace_decls(unique int id: @namespace_decl,
int namespace_id: @namespace ref,
int location: @location_default ref,
int bodylocation: @location_default ref);
usings(unique int id: @using,
int element_id: @element ref,
int container: @element ref,
int location: @location_default ref);
// each function has an ordered list of parameters
params(unique int id: @parameter,
int function: @functionorblock ref,
int index: int ref,
int type_id: @type ref);
overrides(int new: @function ref, int old: @function ref);
membervariables(unique int id: @membervariable,
int type_id: @type ref,
varchar(900) name: string ref);
properties(unique int id: @property,
int type_id: @type ref,
varchar(900) name: string ref,
int getter: @function ref);
property_setter(int prop: @property ref, int setter: @function ref);
property_synthesis(int prop: @property ref, int ivar: @membervariable ref);
property_attribute(int prop: @property ref, int attr: @attribute ref);
property_decl_location(int prop: @property ref, int loc: @location_default ref);
globalvariables(unique int id: @globalvariable,
int type_id: @type ref,
varchar(900) name: string ref);
localvariables(unique int id: @localvariable,
int type_id: @type ref,
varchar(900) name: string ref);
autoderivation(unique int var: @variable ref,
int derivation_type: @type ref);
enumconstants(unique int id: @enumconstant,
int parent: @usertype ref,
int index: int ref,
int type_id: @type ref,
varchar(900) name: string ref,
int location: @location_default ref);
@variable = @localvariable | @globalvariable | @membervariable | @parameter;
/*
Built-in types are the fundamental types, i.e., integral, floating, and void.
kind(1) = error, kind(2) = unknown, kind(3) = void, kind(4) = boolean,
kind(5) = char, kind(6) = unsigned char, kind(7) = signed char
kind(8) = short, kind(9) = unsigned short, kind(10) = signed short
kind(11) = int, kind(12) = unsigned int, kind(13) = signed int,
kind(14) = long, kind(15) = unsigned long, kind(16) = signed long,
kind(17) = long long, kind(18) = unsigned long long, kind(19) = signed long long,
kind(20) = __int8, kind(21) = __int16, kind(22) = __int32, kind(23) = __int64, // Microsoft specific
kind(24) = float, kind(25) = double, kind(26) = long double,
kind(27) = _Complex float, kind(28) = _Complex double, kind(29) = _Complex long double, //C99 specific
kind(30) = _Imaginary float, kind(31) = _Imaginary double, kind(32) = _Imaginary long double, //C99 specific
kind(33) = wchar_t, // MS specific
kind(34) = decltype(nullptr), // C++11
*/
builtintypes(unique int id: @builtintype,
varchar(900) name: string ref,
int kind: int ref,
int size: int ref,
int sign: int ref);
pointersize(unique int size: int ref);
/*
Derived types are types that are directly derived from existing types and
point to, refer to, transform type data to return a new type.
case @derivedtype.kind of
1 = pointer
| 2 = reference
| 3 = type_with_specifiers
| 4 = array
| 5 = gnu_vector
| 6 = routineptr
| 7 = routinereference
| 8 = rvalue_reference // C++11
| 9 = type_conforming_to_protocols // ObjC
| 10 = block
;
*/
derivedtypes(unique int id: @derivedtype,
varchar(900) name: string ref,
int kind: int ref,
int type_id: @type ref);
arraysizes(unique int id: @derivedtype ref,
int num_elements: int ref,
int bytesize: int ref,
int alignment: int ref);
typedefbase(unique int id: @usertype ref,
int type_id: @type ref);
decltypes(unique int id: @decltype,
int expr: @expr ref,
int base_type: @type ref,
boolean parentheses_would_change_meaning: boolean ref);
/*
case @usertype.kind of
1 = struct
| 2 = class
| 3 = union
| 4 = enum
| 5 = typedef
| 6 = template
| 7 = template_parameter
| 8 = template_template_parameter
| 9 = proxy_class // a proxy class associated with a template parameter
| 10 = objc_class
| 11 = objc_protocol
| 12 = objc_category
;
*/
usertypes(unique int id: @usertype,
varchar(900) name: string ref,
int kind: int ref);
usertypesize(unique int id: @usertype ref,
int size: int ref,
int alignment: int ref);
usertype_final(unique int id: @usertype ref);
is_class_template(unique int id: @usertype ref);
class_instantiation(unique int to: @usertype ref,
int from: @usertype ref);
class_template_argument(int type_id: @usertype ref,
int index: int ref,
int arg_type: @type ref);
is_proxy_class_for(unique int id: @usertype ref,
unique int templ_param_id: @usertype ref);
is_function_template(unique int id: @function ref);
function_instantiation(unique int to: @function ref,
int from: @function ref);
function_template_argument(int function_id: @function ref,
int index: int ref,
int arg_type: @type ref);
/*
Fixed point types
precision(1) = short, precision(2) = default, precision(3) = long
is_unsigned(1) = unsigned is_unsigned(2) = signed
is_fract_type(1) = declared with _Fract
saturating(1) = declared with _Sat
*/
/* TODO
fixedpointtypes(unique int id: @fixedpointtype,
int precision: int ref,
int is_unsigned: int ref,
int is_fract_type: int ref,
int saturating: int ref);
*/
routinetypes(unique int id: @routinetype,
int return_type: @type ref);
routinetypeargs(int routine: @routinetype ref,
int index: int ref,
int type_id: @type ref);
ptrtomembers(unique int id: @ptrtomember,
int type_id: @type ref,
int class_id: @type ref);
/*
specifiers for types, functions, and variables
"public",
"protected",
"private",
"const",
"volatile",
"static",
"pure",
"virtual",
"sealed", // Microsoft
"__interface", // Microsoft
"inline",
"explicit",
"near", // near far extension
"far", // near far extension
"__ptr32", // Microsoft
"__ptr64", // Microsoft
"__sptr", // Microsoft
"__uptr", // Microsoft
"dllimport", // Microsoft
"dllexport", // Microsoft
"thread", // Microsoft
"naked", // Microsoft
"microsoft_inline", // Microsoft
"forceinline", // Microsoft
"selectany", // Microsoft
"nothrow", // Microsoft
"novtable", // Microsoft
"noreturn", // Microsoft
"noinline", // Microsoft
"noalias", // Microsoft
"restrict", // Microsoft
*/
/* REMOVE
typerefs(unique int id: @typeref,
int type_id: @type ref);
*/
specifiers(unique int id: @specifier,
unique varchar(900) str: string ref);
typespecifiers(int type_id: @type ref,
int spec_id: @specifier ref);
/* REMOVE
typerefspecs(int type_ref_id: @typeref ref,
int spec_id: @specifier ref);
*/
funspecifiers(int func_id: @function ref,
int spec_id: @specifier ref);
varspecifiers(int var_id: @accessible ref,
int spec_id: @specifier ref);
@specifiable = /* REMOVE @typeref |*/ @type | @function | @variable | @enumconstant | @frienddecl;
attributes(unique int id: @attribute,
int kind: int ref,
varchar(100) name: string ref,
varchar(100) name_space: string ref,
int location: @location_default ref);
case @attribute.kind of
0 = @gnuattribute
| 1 = @stdattribute
| 2 = @declspec
| 3 = @msattribute
| 4 = @alignas
| 5 = @objc_propertyattribute
;
attribute_args(unique int id: @attribute_arg,
int kind: int ref,
int attribute: @attribute ref,
int index: int ref,
int location: @location_default ref);
case @attribute_arg.kind of
0 = @attribute_arg_empty
| 1 = @attribute_arg_token
| 2 = @attribute_arg_constant
| 3 = @attribute_arg_type
;
attribute_arg_value(unique int arg: @attribute_arg ref, varchar(100) value: string ref);
attribute_arg_type(unique int arg: @attribute_arg ref, int type_id: @type ref);
attribute_arg_name(unique int arg: @attribute_arg ref, varchar(100) name: string ref);
typeattributes(int type_id: @type ref,
int spec_id: @attribute ref);
funcattributes(int func_id: @function ref,
int spec_id: @attribute ref);
varattributes(int var_id: @accessible ref,
int spec_id: @attribute ref);
stmtattributes(int stmt_id: @stmt ref,
int spec_id: @attribute ref);
@type = @builtintype | @derivedtype | @usertype /* TODO | @fixedpointtype */ | @routinetype | @ptrtomember | @decltype;
member(int parent: @type ref,
int index: int ref,
int child: @member ref);
enclosingfunction(unique int child: @usertype ref,
int parent: @function ref);
derivations(unique int derivation: @derivation,
int sub: @type ref,
int index: int ref,
int super: @type ref,
int location: @location_default ref);
derspecifiers(int der_id: @derivation ref,
int spec_id: @specifier ref);
frienddecls(unique int id: @frienddecl,
int type_id: @type ref,
int decl_id: @declaration ref,
int location: @location_default ref);
conforming_to_protocols(int type_id: @type ref,
int protocol: @usertype ref);
@declaredtype = @usertype ;
@declaration = @function | @declaredtype | @variable | @enumconstant | @frienddecl | @property;
@member = @membervariable | @function | @declaredtype | @enumconstant | @property;
@locatable = @diagnostic | @declaration | @ppd_include | @ppd_define | @macroinvocation /*| @funcall*/ | @xmllocatable | @attribute | @attribute_arg;
@scope = @stmt | @function | @namedscope;
@namedscope = @namespace | @usertype;
@element = @locatable | @file | @folder | @specifier | @type | @expr /* | @typeref */ | @namespace | @initialiser | @stmt | @derivation | @comment | @preprocdirect | @fun_decl | @var_decl | @type_decl | @namespace_decl | @using | @namequalifier | @specialnamequalifyingelement | @externalDefect | @externalMetric;
@exprparent = @element;
comments(unique int id: @comment,
varchar(900) contents: string ref,
int location: @location_default ref);
commentbinding(unique int id: @comment ref,
int element: @element ref);
exprconv(int converted: @expr ref,
unique int conversion: @expr ref);
compgenerated(unique int id: @element ref);
namespaces(unique int id: @namespace,
varchar(900) name: string ref);
namespacembrs(int parentid: @namespace ref,
unique int memberid: @namespacembr ref);
@namespacembr = @declaration | @namespace;
exprparents(int expr_id: @expr ref,
int child_index: int ref,
int parent_id: @exprparent ref);
/*
case @funbindexpr.kind of
0 = @normal_call // a normal call
| 1 = @virtual_call // a virtual call
| 2 = @adl_call // a call whose target is only found by ADL
;
*/
iscall(unique int caller: @funbindexpr ref, int kind: int ref);
numtemplatearguments(unique int expr_id: @expr ref,
int num: int ref);
specialnamequalifyingelements(unique int id: @specialnamequalifyingelement,
unique varchar(900) name: string ref);
@namequalifiableelement = @expr | @namequalifier;
@namequalifyingelement = @namespace | @specialnamequalifyingelement | @usertype;
namequalifiers(unique int id: @namequalifier,
unique int qualifiableelement: @namequalifiableelement ref,
int qualifyingelement: @namequalifyingelement ref,
int location: @location_default ref);
varbind(unique int expr: @varbindexpr ref,
int var: @accessible ref);
funbind(unique int expr: @funbindexpr ref,
int fun: @function ref);
// the second field is a string representation of the value
// the third field is the actual text in the source or the same as the second field
values(unique int id: @value,
varchar(900) str: string ref,
varchar(900) text: string ref);
valuebind(int val: @value ref,
unique int expr: @expr ref);
objc_string(int lit: @literal ref);
fieldoffsets(unique int id: @variable ref,
int byteoffset: int ref,
int bitoffset: int ref);
bitfield(unique int id: @variable ref,
int bits: int ref,
int declared_bits: int ref);
/* REMOVE
varrefbind(int var: @variable ref,
int expr: @varref ref);
*/
/* REMOVE
funrefbind(int fun: @function ref,
int expr: @funref ref);
*/
/* TODO
memberprefix(int member: @expr ref,
int prefix: @expr ref);
*/
/*
kind(1) = mbrcallexpr
kind(2) = mbrptrcallexpr
kind(3) = mbrptrmbrcallexpr
kind(4) = ptrmbrptrmbrcallexpr
kind(5) = mbrreadexpr // x.y
kind(6) = mbrptrreadexpr // p->y
kind(7) = mbrptrmbrreadexpr // x.*pm
kind(8) = mbrptrmbrptrreadexpr // x->*pm
kind(9) = staticmbrreadexpr // static x.y
kind(10) = staticmbrptrreadexpr // static p->y
*/
/* TODO
memberaccess(int member: @expr ref,
int kind: int ref);
*/
initialisers(unique int init: @initialiser,
int var: @accessible ref,
unique int expr: @expr ref,
int location: @location_expr ref);
exprcontainers(int exp: @expr ref,
int container: @exprcontainer ref);
@exprcontainer = @function | @variable | @enumconstant | @usertype;
exprs(unique int id: @expr,
int kind: int ref,
int typeid: @type ref,
int location: @location_expr ref);
case @expr.kind of
1 = @errorexpr
| 2 = @address_of // & AddressOfExpr
| 3 = @reference_to // ReferenceToExpr (implicit?)
| 4 = @indirect // * PointerDereferenceExpr
| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?)
// ...
| 8 = @array_to_pointer // (???)
| 9 = @vacuous_destructor_call // VacuousDestructorCall
// ...
| 11 = @assume // Microsoft
| 12 = @parexpr
| 13 = @arithnegexpr
| 14 = @unaryplusexpr
| 15 = @complementexpr
| 16 = @notexpr
| 17 = @conjugation // GNU ~ operator
| 18 = @realpartexpr // GNU __real
| 19 = @imagpartexpr // GNU __imag
| 20 = @postincrexpr
| 21 = @postdecrexpr
| 22 = @preincrexpr
| 23 = @predecrexpr
| 24 = @conditionalexpr
| 25 = @addexpr
| 26 = @subexpr
| 27 = @mulexpr
| 28 = @divexpr
| 29 = @remexpr
| 30 = @jmulexpr // C99 mul imaginary
| 31 = @jdivexpr // C99 div imaginary
| 32 = @fjaddexpr // C99 add real + imaginary
| 33 = @jfaddexpr // C99 add imaginary + real
| 34 = @fjsubexpr // C99 sub real - imaginary
| 35 = @jfsubexpr // C99 sub imaginary - real
| 36 = @paddexpr // pointer add (pointer + int or int + pointer)
| 37 = @psubexpr // pointer sub (pointer - integer)
| 38 = @pdiffexpr // difference between two pointers
| 39 = @lshiftexpr
| 40 = @rshiftexpr
| 41 = @andexpr
| 42 = @orexpr
| 43 = @xorexpr
| 44 = @eqexpr
| 45 = @neexpr
| 46 = @gtexpr
| 47 = @ltexpr
| 48 = @geexpr
| 49 = @leexpr
| 50 = @minexpr // GNU minimum
| 51 = @maxexpr // GNU maximum
| 52 = @assignexpr
| 53 = @assignaddexpr
| 54 = @assignsubexpr
| 55 = @assignmulexpr
| 56 = @assigndivexpr
| 57 = @assignremexpr
| 58 = @assignlshiftexpr
| 59 = @assignrshiftexpr
| 60 = @assignandexpr
| 61 = @assignorexpr
| 62 = @assignxorexpr
| 63 = @assignpaddexpr // assign pointer add
| 64 = @assignpsubexpr // assign pointer sub
| 65 = @andlogicalexpr
| 66 = @orlogicalexpr
| 67 = @commaexpr
| 68 = @subscriptexpr // access to member of an array, e.g., a[5]
| 69 = @objc_subscriptexpr // ObjC custom subscripting
// ...
| 73 = @virtfunptrexpr
| 74 = @callexpr
| 75 = @msgexpr_normal // Objective C
| 76 = @msgexpr_super // Objective C
| 77 = @atselectorexpr // Objective C
| 78 = @atprotocolexpr // Objective C
| 79 = @vastartexpr
| 80 = @vaargexpr
| 81 = @vaendexpr
| 82 = @vacopyexpr
| 83 = @atencodeexpr // Objective C
| 84 = @varaccess
| 85 = @thisaccess
| 86 = @objc_box_expr // Objective C
| 87 = @new_expr
| 88 = @delete_expr
| 89 = @throw_expr
| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2)
// ...
| 92 = @type_id
| 93 = @runtime_sizeof
| 94 = @runtime_alignof
// ...
| 96 = @expr_stmt // GNU extension
| 97 = @routineexpr
| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....)
| 99 = @offsetofexpr // offsetof ::= type and field
| 100 = @hasassignexpr // __has_assign ::= type
| 101 = @hascopyexpr // __has_copy ::= type
| 102 = @hasnothrowassign // __has_nothrow_assign ::= type
| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type
| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type
| 105 = @hastrivialassign // __has_trivial_assign ::= type
| 106 = @hastrivialconstr // __has_trivial_constructor ::= type
| 107 = @hastrivialcopy // __has_trivial_copy ::= type
| 108 = @hasuserdestr // __has_user_destructor ::= type
| 109 = @hasvirtualdestr // __has_virtual_desctructor ::= type
| 110 = @isabstractexpr // __is_abstract ::= type
| 111 = @isbaseofexpr // __is_base_of ::= type type
| 112 = @isclassexpr // __is_class ::= type
| 113 = @isconvtoexpr // __is_convertible_to ::= type type
| 114 = @isemptyexpr // __is_empty ::= type
| 115 = @isenumexpr // __is_enum ::= type
| 116 = @ispodexpr // __is_pod ::= type
| 117 = @ispolyexpr // __is_polymorphic ::= type
| 118 = @isunionexpr // __is_union ::= type
| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type
| 120 = @intaddrexpr // EDG internal builtin, used to implement offsetof
// ...
| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type
| 123 = @literal
| 127 = @aggregateliteral
| 128 = @delete_array_expr
| 129 = @new_array_expr
| 130 = @objc_array_literal
| 131 = @objc_dictionary_literal
// ...
| 200 = @ctordirectinit
| 201 = @ctorvirtualinit
| 202 = @ctorfieldinit
| 203 = @ctordelegatinginit
| 204 = @dtordirectdestruct
| 205 = @dtorvirtualdestruct
| 206 = @dtorfielddestruct
// ...
| 210 = @static_cast
| 211 = @reinterpret_cast
| 212 = @const_cast
| 213 = @dynamic_cast
| 214 = @c_style_cast
| 215 = @lambdaexpr
| 216 = @param_ref
| 217 = @noopexpr
// ...
| 294 = @istriviallyconstructibleexpr
| 295 = @isdestructibleexpr
| 296 = @isnothrowdestructibleexpr
| 297 = @istriviallydestructibleexpr
| 298 = @istriviallyassignableexpr
| 299 = @isnothrowassignableexpr
| 300 = @istrivialexpr
| 301 = @isstandardlayoutexpr
| 302 = @istriviallycopyableexpr
| 303 = @isliteraltypeexpr
| 304 = @hastrivialmoveconstructorexpr
| 305 = @hastrivialmoveassignexpr
| 306 = @hasnothrowmoveassignexpr
| 307 = @isconstructibleexpr
| 308 = @isnothrowconstructibleexpr
| 309 = @hasfinalizerexpr
| 310 = @isdelegateexpr
| 311 = @isinterfaceclassexpr
| 312 = @isrefarrayexpr
| 313 = @isrefclassexpr
| 314 = @issealedexpr
| 315 = @issimplevalueclassexpr
| 316 = @isvalueclassexpr
| 317 = @isfinalexpr
| 319 = @noexceptexpr
;
@ctorinit = @ctordirectinit | @ctorvirtualinit | @ctorfieldinit | @ctordelegatinginit;
@dtordestruct = @dtordirectdestruct | @dtorvirtualdestruct | @dtorfielddestruct;
@msgexpr = @msgexpr_normal | @msgexpr_super;
msgexpr_selector(unique int expr: @msgexpr ref, varchar(64) selector : string ref);
msgexpr_receiver_type(unique int expr: @msgexpr_normal ref, int receiver : @type ref);
msgexpr_for_property(unique int expr: @msgexpr_normal ref);
atselectorexpr_selector(unique int expr: @atselectorexpr ref, varchar(64) selector : string ref);
atprotocolexpr_protocol(unique int expr: @atprotocolexpr ref, int protocol : @usertype ref);
atencodeexpr_type(unique int expr: @atencodeexpr ref, int the_type : @type ref);
condition_decl_bind(unique int expr: @condition_decl ref,
unique int decl: @declaration ref);
typeid_bind(unique int expr: @type_id ref,
int type_id: @type ref);
@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof;
sizeof_bind(unique int expr: @runtime_sizeof_or_alignof ref,
int type_id: @type ref);
code_block(unique int block: @literal ref,
unique int routine: @function ref);
lambdas(unique int expr: @lambdaexpr ref,
varchar(1) default_capture: string ref,
boolean has_explicit_return_type: boolean ref);
lambda_capture(unique int id: @lambdacapture,
int lambda: @lambdaexpr ref,
int index: int ref,
boolean captured_by_reference: boolean ref,
boolean is_implicit: boolean ref,
int location: @location_default ref);
@funbindexpr = @routineexpr | @new_expr | @delete_expr | @delete_array_expr | @ctordirectinit | @ctorvirtualinit | @ctordelegatinginit | @dtordirectdestruct | @dtorvirtualdestruct | @msgexpr;
@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct;
@addressable = @function | @variable ;
@accessible = @addressable | @enumconstant ;
@callable = @function | @variable; // only for variables with routine types
stmts(unique int id: @stmt,
int kind: int ref,
int location: @location_stmt ref);
case @stmt.kind of
1 = @stmt_expr
| 2 = @stmt_if
| 3 = @stmt_while
| 4 = @stmt_goto
| 5 = @stmt_label
| 6 = @stmt_return
| 7 = @stmt_block
| 8 = @stmt_end_test_while // do { ... } while ( ... )
| 9 = @stmt_for
| 10 = @stmt_switch_case
| 11 = @stmt_switch
| 13 = @stmt_asm // "asm" statement or the body of an asm function
| 15 = @stmt_try_block
| 16 = @stmt_microsoft_try // Microsoft
| 17 = @stmt_decl
| 18 = @stmt_set_vla_size // C99
| 19 = @stmt_vla_decl // C99
| 25 = @stmt_assigned_goto // GNU
| 26 = @stmt_empty
| 27 = @stmt_continue
| 28 = @stmt_break
| 29 = @stmt_range_based_for // C++11
| 30 = @stmt_at_autoreleasepool_block // Objective C
| 31 = @stmt_objc_for_in // Objective C
| 32 = @stmt_at_synchronized // Objective C
;
objc_for_in(unique int loop: @stmt_objc_for_in ref,
int collection: @expr ref,
int condition: @expr ref,
int body: @stmt ref);
@stmtparent = @stmt | @expr_stmt ;
stmtparents(unique int id: @stmt ref,
int index: int ref,
int parent: @stmtparent ref);
ishandler(unique int block: @stmt_block ref);
isfinally(unique int block: @stmt_block ref);
is_objc_try_stmt(unique int try: @stmt ref);
is_objc_throw(unique int throw: @throw_expr ref);
@cfgnode = @stmt | @expr | @function | @initialiser ;
successors(int from: @cfgnode ref,
int to: @cfgnode ref);
truecond(unique int from: @cfgnode ref,
int to: @cfgnode ref);
falsecond(unique int from: @cfgnode ref,
int to: @cfgnode ref);
stmtfunction(unique int stmt: @stmt ref,
int fun: @function ref);
stmt_decl_bind(int stmt: @stmt_decl ref,
int decl: @declaration ref);
@functionorblock = @function | @stmt_block;
blockscope(int block: @stmt_block ref,
int enclosing: @functionorblock ref);
@jump = @stmt_goto | @stmt_break | @stmt_continue;
@jumporlabel = @jump | @stmt_label | @literal;
jumpinfo(unique int id: @jumporlabel ref,
varchar(900) str: string ref,
int target: @stmt ref);
preprocdirects(unique int id: @preprocdirect,
int kind: int ref,
int location: @location_default ref);
case @preprocdirect.kind of
0 = @ppd_if
| 1 = @ppd_ifdef
| 2 = @ppd_ifndef
| 3 = @ppd_elif
| 4 = @ppd_else
| 5 = @ppd_endif
| 6 = @ppd_plain_include
| 7 = @ppd_define
| 8 = @ppd_undef
| 9 = @ppd_line
| 10 = @ppd_error
| 11 = @ppd_pragma
| 12 = @ppd_objc_import
| 13 = @ppd_include_next
| 18 = @ppd_warning
;
@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next;
@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif;
preprocpair(int begin : @ppd_branch ref,
int end : @ppd_endif ref);
preproctrue(int branch : @ppd_branch ref);
preprocfalse(int branch : @ppd_branch ref);
preproctext(unique int id: @preprocdirect ref,