adlint 3.0.4 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +374 -13
- data/INSTALL +1 -3
- data/MANIFEST +12 -0
- data/NEWS +30 -4
- data/README +0 -4
- data/TODO +2 -1
- data/etc/mesg.d/c_builtin/en_US/messages.yml +2 -2
- data/etc/mesg.d/c_builtin/ja_JP/messages.yml +2 -2
- data/etc/mesg.d/core/en_US/messages.yml +5 -1
- data/etc/mesg.d/core/ja_JP/messages.yml +5 -1
- data/features/code_check/W0422.feature +128 -0
- data/features/code_check/W0491.feature +57 -0
- data/features/code_check/W0492.feature +80 -0
- data/features/code_check/W0542.feature +20 -0
- data/features/code_check/W0580.feature +25 -0
- data/features/code_check/W0610.feature +36 -0
- data/features/code_check/W0642.feature +67 -0
- data/features/code_check/W0786.feature +39 -0
- data/features/code_check/W0830.feature +27 -0
- data/features/code_check/W1047.feature +72 -0
- data/features/code_check/W9003.feature +22 -0
- data/features/code_extraction/TODO +1 -0
- data/features/metric_measurement/TODO +1 -0
- data/lib/adlint/analyzer.rb +2 -2
- data/lib/adlint/cc1/ctrlexpr.rb +27 -6
- data/lib/adlint/cc1/domain.rb +72 -12
- data/lib/adlint/cc1/enum.rb +4 -0
- data/lib/adlint/cc1/expr.rb +31 -29
- data/lib/adlint/cc1/interp.rb +45 -56
- data/lib/adlint/cc1/lexer.rb +26 -5
- data/lib/adlint/cc1/mediator.rb +35 -6
- data/lib/adlint/cc1/object.rb +62 -19
- data/lib/adlint/cc1/parser.rb +948 -904
- data/lib/adlint/cc1/parser.y +59 -29
- data/lib/adlint/cc1/phase.rb +6 -8
- data/lib/adlint/cc1/syntax.rb +70 -17
- data/lib/adlint/cc1/util.rb +4 -4
- data/lib/adlint/code.rb +16 -6
- data/lib/adlint/cpp/eval.rb +31 -25
- data/lib/adlint/cpp/lexer.rb +11 -5
- data/lib/adlint/cpp/macro.rb +34 -7
- data/lib/adlint/cpp/phase.rb +8 -8
- data/lib/adlint/error.rb +6 -0
- data/lib/adlint/exam/c_builtin/cc1_check.rb +557 -594
- data/lib/adlint/exam/c_builtin/cc1_check_shima.rb +72 -72
- data/lib/adlint/exam/c_builtin/cc1_code.rb +72 -52
- data/lib/adlint/exam/c_builtin/cc1_metric.rb +131 -131
- data/lib/adlint/exam/c_builtin/cpp_check.rb +48 -48
- data/lib/adlint/exam/c_builtin/cpp_check_shima.rb +2 -2
- data/lib/adlint/exam/c_builtin/cpp_code.rb +21 -21
- data/lib/adlint/exam/c_builtin/ld_check.rb +88 -87
- data/lib/adlint/exam/c_builtin/ld_metric.rb +4 -5
- data/lib/adlint/exam/c_builtin.rb +6 -6
- data/lib/adlint/ld/object.rb +269 -186
- data/lib/adlint/ld/phase.rb +19 -19
- data/lib/adlint/ld/typedef.rb +7 -7
- data/lib/adlint/ld/util.rb +25 -17
- data/lib/adlint/location.rb +6 -1
- data/lib/adlint/memo.rb +66 -13
- data/lib/adlint/prelude.rb +2 -2
- data/lib/adlint/report.rb +13 -14
- data/lib/adlint/util.rb +1 -1
- data/lib/adlint/version.rb +2 -2
- data/share/doc/Makefile +6 -2
- data/share/doc/c99gram.dot +502 -0
- data/share/doc/c99gram.pdf +0 -0
- data/share/doc/developers_guide_ja.html +4 -3
- data/share/doc/developers_guide_ja.texi +2 -1
- data/share/doc/users_guide_en.html +9 -9
- data/share/doc/users_guide_en.texi +7 -7
- data/share/doc/users_guide_ja.html +9 -9
- data/share/doc/users_guide_ja.texi +7 -7
- metadata +14 -2
@@ -96,8 +96,8 @@ module CBuiltin #:nodoc:
|
|
96
96
|
|
97
97
|
def initialize(phase_ctxt)
|
98
98
|
super
|
99
|
-
|
100
|
-
|
99
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
100
|
+
traversal.enter_union_type_declaration += T(:check)
|
101
101
|
end
|
102
102
|
|
103
103
|
private
|
@@ -122,8 +122,8 @@ module CBuiltin #:nodoc:
|
|
122
122
|
|
123
123
|
def initialize(phase_ctxt)
|
124
124
|
super
|
125
|
-
|
126
|
-
|
125
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
126
|
+
traversal.enter_kandr_function_definition += T(:check)
|
127
127
|
end
|
128
128
|
|
129
129
|
def check(node)
|
@@ -222,12 +222,12 @@ module CBuiltin #:nodoc:
|
|
222
222
|
|
223
223
|
def initialize(phase_ctxt)
|
224
224
|
super
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
225
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
226
|
+
traversal.enter_ansi_function_definition += T(:start_function)
|
227
|
+
traversal.enter_kandr_function_definition += T(:start_function)
|
228
|
+
traversal.leave_ansi_function_definition += T(:end_function)
|
229
|
+
traversal.leave_kandr_function_definition += T(:end_function)
|
230
|
+
traversal.enter_return_statement += T(:check)
|
231
231
|
@cur_fun = nil
|
232
232
|
end
|
233
233
|
|
@@ -320,8 +320,8 @@ module CBuiltin #:nodoc:
|
|
320
320
|
|
321
321
|
def initialize(phase_ctxt)
|
322
322
|
super
|
323
|
-
|
324
|
-
|
323
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
324
|
+
traversal.enter_relational_expression += T(:check)
|
325
325
|
end
|
326
326
|
|
327
327
|
private
|
@@ -371,8 +371,8 @@ module CBuiltin #:nodoc:
|
|
371
371
|
|
372
372
|
def initialize(phase_ctxt)
|
373
373
|
super
|
374
|
-
|
375
|
-
|
374
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
375
|
+
traversal.enter_and_expression += T(:check)
|
376
376
|
end
|
377
377
|
|
378
378
|
private
|
@@ -392,8 +392,8 @@ module CBuiltin #:nodoc:
|
|
392
392
|
|
393
393
|
def initialize(phase_ctxt)
|
394
394
|
super
|
395
|
-
|
396
|
-
|
395
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
396
|
+
traversal.enter_inclusive_or_expression += T(:check)
|
397
397
|
end
|
398
398
|
|
399
399
|
private
|
@@ -413,14 +413,14 @@ module CBuiltin #:nodoc:
|
|
413
413
|
|
414
414
|
def initialize(phase_ctxt)
|
415
415
|
super
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
416
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
417
|
+
traversal.enter_additive_expression += T(:check)
|
418
|
+
traversal.enter_multiplicative_expression += T(:check)
|
419
|
+
traversal.enter_shift_expression += T(:check)
|
420
|
+
traversal.enter_and_expression += T(:check)
|
421
|
+
traversal.enter_exclusive_or_expression += T(:check)
|
422
|
+
traversal.enter_inclusive_or_expression += T(:check)
|
423
|
+
traversal.enter_compound_assignment_expression += T(:check)
|
424
424
|
end
|
425
425
|
|
426
426
|
private
|
@@ -489,8 +489,8 @@ module CBuiltin #:nodoc:
|
|
489
489
|
|
490
490
|
def initialize(phase_ctxt)
|
491
491
|
super
|
492
|
-
|
493
|
-
|
492
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
493
|
+
traversal.enter_logical_and_expression += T(:check)
|
494
494
|
end
|
495
495
|
|
496
496
|
private
|
@@ -512,8 +512,8 @@ module CBuiltin #:nodoc:
|
|
512
512
|
|
513
513
|
def initialize(phase_ctxt)
|
514
514
|
super
|
515
|
-
|
516
|
-
|
515
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
516
|
+
traversal.enter_logical_or_expression += T(:check)
|
517
517
|
end
|
518
518
|
|
519
519
|
private
|
@@ -535,9 +535,9 @@ module CBuiltin #:nodoc:
|
|
535
535
|
|
536
536
|
def initialize(phase_ctxt)
|
537
537
|
super
|
538
|
-
|
539
|
-
|
540
|
-
|
538
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
539
|
+
traversal.enter_logical_and_expression += T(:check)
|
540
|
+
traversal.enter_logical_or_expression += T(:check)
|
541
541
|
end
|
542
542
|
|
543
543
|
private
|
@@ -576,11 +576,11 @@ module CBuiltin #:nodoc:
|
|
576
576
|
|
577
577
|
def initialize(phase_ctxt)
|
578
578
|
super
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
579
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
580
|
+
traversal.enter_switch_statement += T(:enter_switch_statement)
|
581
|
+
traversal.leave_switch_statement += T(:check)
|
582
|
+
traversal.enter_case_labeled_statement += T(:add_exec_path)
|
583
|
+
traversal.enter_default_labeled_statement += T(:add_exec_path)
|
584
584
|
@exec_path_nums = []
|
585
585
|
end
|
586
586
|
|
@@ -610,9 +610,9 @@ module CBuiltin #:nodoc:
|
|
610
610
|
|
611
611
|
def initialize(phase_ctxt)
|
612
612
|
super
|
613
|
-
|
614
|
-
|
615
|
-
|
613
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
614
|
+
traversal.enter_struct_type_declaration += T(:check)
|
615
|
+
traversal.enter_union_type_declaration += T(:check)
|
616
616
|
end
|
617
617
|
|
618
618
|
private
|
@@ -630,20 +630,20 @@ module CBuiltin #:nodoc:
|
|
630
630
|
|
631
631
|
def initialize(phase_ctxt)
|
632
632
|
super
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
633
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
634
|
+
traversal.enter_function_declaration += T(:check_function_name)
|
635
|
+
traversal.enter_variable_declaration += T(:check_variable_name)
|
636
|
+
traversal.enter_variable_definition += T(:check_variable_name)
|
637
|
+
traversal.enter_parameter_definition += T(:check_variable_name)
|
638
|
+
traversal.enter_typedef_declaration += T(:check_typedef_name)
|
639
|
+
traversal.enter_struct_type_declaration += T(:check_tag_name)
|
640
|
+
traversal.enter_union_type_declaration += T(:check_tag_name)
|
641
|
+
traversal.enter_enum_type_declaration += T(:check_tag_name)
|
642
|
+
traversal.enter_enumerator += T(:check_enumerator_name)
|
643
|
+
traversal.enter_kandr_function_definition += T(:enter_function)
|
644
|
+
traversal.enter_ansi_function_definition += T(:enter_function)
|
645
|
+
traversal.leave_kandr_function_definition += T(:leave_function)
|
646
|
+
traversal.leave_ansi_function_definition += T(:leave_function)
|
647
647
|
@function_def_level = 0
|
648
648
|
end
|
649
649
|
|
@@ -725,12 +725,12 @@ module CBuiltin #:nodoc:
|
|
725
725
|
|
726
726
|
def initialize(phase_ctxt)
|
727
727
|
super
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
728
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
729
|
+
traversal.enter_generic_labeled_statement += T(:check)
|
730
|
+
traversal.enter_ansi_function_definition += T(:enter_function)
|
731
|
+
traversal.leave_ansi_function_definition += T(:leave_function)
|
732
|
+
traversal.enter_kandr_function_definition += T(:enter_function)
|
733
|
+
traversal.leave_kandr_function_definition += T(:leave_function)
|
734
734
|
@labels = nil
|
735
735
|
end
|
736
736
|
|
@@ -763,10 +763,10 @@ module CBuiltin #:nodoc:
|
|
763
763
|
|
764
764
|
def initialize(phase_ctxt)
|
765
765
|
super
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
766
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
767
|
+
traversal.enter_ansi_function_definition += T(:check)
|
768
|
+
traversal.enter_kandr_function_definition += T(:check)
|
769
|
+
traversal.enter_function_declaration += T(:check)
|
770
770
|
end
|
771
771
|
|
772
772
|
private
|
@@ -878,13 +878,13 @@ module CBuiltin #:nodoc:
|
|
878
878
|
|
879
879
|
def initialize(phase_ctxt)
|
880
880
|
super
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
881
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
882
|
+
traversal.enter_ansi_function_definition += T(:enter_function)
|
883
|
+
traversal.enter_kandr_function_definition += T(:enter_function)
|
884
|
+
traversal.enter_compound_statement += T(:enter_compound_stmt)
|
885
|
+
traversal.leave_compound_statement += T(:leave_compound_stmt)
|
886
|
+
traversal.enter_if_else_statement += T(:enter_if_else_stmt)
|
887
|
+
traversal.leave_if_else_statement += T(:leave_if_else_stmt)
|
888
888
|
@if_else_stmt_chain_stack = []
|
889
889
|
end
|
890
890
|
|
@@ -942,8 +942,8 @@ module CBuiltin #:nodoc:
|
|
942
942
|
|
943
943
|
def initialize(phase_ctxt)
|
944
944
|
super
|
945
|
-
|
946
|
-
|
945
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
946
|
+
traversal.enter_goto_statement += T(:warn_goto)
|
947
947
|
end
|
948
948
|
|
949
949
|
private
|
@@ -43,11 +43,11 @@ module CBuiltin #:nodoc:
|
|
43
43
|
|
44
44
|
def initialize(phase_ctxt)
|
45
45
|
super
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
47
|
+
traversal.enter_typedef_declaration += T(:extract_typedef)
|
48
|
+
traversal.enter_struct_type_declaration += T(:extract_struct)
|
49
|
+
traversal.enter_union_type_declaration += T(:extract_union)
|
50
|
+
traversal.enter_enum_type_declaration += T(:extract_enum)
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
@@ -96,7 +96,7 @@ module CBuiltin #:nodoc:
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
-
class
|
99
|
+
class FunDclExtraction < CodeExtraction
|
100
100
|
def_registrant_phase Cc1::Prepare2Phase
|
101
101
|
|
102
102
|
def initialize(phase_ctxt)
|
@@ -115,22 +115,22 @@ module CBuiltin #:nodoc:
|
|
115
115
|
|
116
116
|
def extract_explicit_dcl(fun_dcl, fun)
|
117
117
|
if fun.declared_as_extern?
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
118
|
+
FUNDCL(fun_dcl.identifier.location, "X",
|
119
|
+
@block_level == 0 ? "F" : "B", "E",
|
120
|
+
FunctionId.new(fun_dcl.identifier.value,
|
121
|
+
fun_dcl.signature.to_s))
|
122
122
|
else
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
FUNDCL(fun_dcl.identifier.location, "I",
|
124
|
+
@block_level == 0 ? "F" : "B", "E",
|
125
|
+
FunctionId.new(fun_dcl.identifier.value,
|
126
|
+
fun_dcl.signature.to_s))
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
130
|
def extract_implicit_dcl(expr, fun)
|
131
131
|
if fun.named?
|
132
|
-
|
133
|
-
|
132
|
+
FUNDCL(expr.location, "X", "F", "I",
|
133
|
+
FunctionId.new(fun.name, fun.signature.to_s))
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
@@ -217,7 +217,7 @@ module CBuiltin #:nodoc:
|
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
220
|
-
class
|
220
|
+
class FunDefExtraction < CodeExtraction
|
221
221
|
def_registrant_phase Cc1::Prepare2Phase
|
222
222
|
|
223
223
|
def initialize(phase_ctxt)
|
@@ -234,9 +234,9 @@ module CBuiltin #:nodoc:
|
|
234
234
|
fun_id = FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s)
|
235
235
|
case
|
236
236
|
when fun.declared_as_extern?
|
237
|
-
|
237
|
+
FUNDEF(fun_def.identifier.location, "X", "F", fun_id, fun_def.lines)
|
238
238
|
when fun.declared_as_static?
|
239
|
-
|
239
|
+
FUNDEF(fun_def.identifier.location, "I", "F", fun_id, fun_def.lines)
|
240
240
|
end
|
241
241
|
end
|
242
242
|
end
|
@@ -246,8 +246,8 @@ module CBuiltin #:nodoc:
|
|
246
246
|
|
247
247
|
def initialize(phase_ctxt)
|
248
248
|
super
|
249
|
-
|
250
|
-
|
249
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
250
|
+
traversal.enter_generic_labeled_statement += T(:extract)
|
251
251
|
end
|
252
252
|
|
253
253
|
private
|
@@ -264,8 +264,8 @@ module CBuiltin #:nodoc:
|
|
264
264
|
|
265
265
|
def initialize(phase_ctxt)
|
266
266
|
super
|
267
|
-
|
268
|
-
|
267
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
268
|
+
traversal.enter_variable_definition += T(:extract)
|
269
269
|
end
|
270
270
|
|
271
271
|
private
|
@@ -285,9 +285,9 @@ module CBuiltin #:nodoc:
|
|
285
285
|
|
286
286
|
def initialize(phase_ctxt)
|
287
287
|
super
|
288
|
-
|
289
|
-
|
290
|
-
|
288
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
289
|
+
traversal.enter_simple_assignment_expression += T(:extract)
|
290
|
+
traversal.enter_compound_assignment_expression += T(:extract)
|
291
291
|
end
|
292
292
|
|
293
293
|
private
|
@@ -304,13 +304,14 @@ module CBuiltin #:nodoc:
|
|
304
304
|
end
|
305
305
|
end
|
306
306
|
|
307
|
-
class
|
307
|
+
class FuncallExtraction < CodeExtraction
|
308
308
|
def_registrant_phase Cc1::Prepare2Phase
|
309
309
|
|
310
310
|
def initialize(phase_ctxt)
|
311
311
|
super
|
312
312
|
@interp = phase_ctxt[:cc1_interpreter]
|
313
313
|
@interp.on_function_started += T(:update_caller)
|
314
|
+
@interp.on_function_ended += T(:clear_caller)
|
314
315
|
@interp.on_function_call_expr_evaled += T(:extract_function_call)
|
315
316
|
@caller = nil
|
316
317
|
end
|
@@ -323,16 +324,24 @@ module CBuiltin #:nodoc:
|
|
323
324
|
@caller = fun
|
324
325
|
end
|
325
326
|
|
327
|
+
def clear_caller(*)
|
328
|
+
@caller = nil
|
329
|
+
end
|
330
|
+
|
326
331
|
def extract_function_call(funcall_expr, fun, *)
|
327
|
-
if
|
328
|
-
|
329
|
-
|
330
|
-
|
332
|
+
if fun.named?
|
333
|
+
if @caller
|
334
|
+
referrer = FunctionId.new(@caller.name, @caller.signature.to_s)
|
335
|
+
else
|
336
|
+
referrer = FunctionId.of_ctors_section
|
337
|
+
end
|
338
|
+
FUNCALL(funcall_expr.location, referrer,
|
339
|
+
FunctionId.new(fun.name, fun.signature.to_s))
|
331
340
|
end
|
332
341
|
end
|
333
342
|
end
|
334
343
|
|
335
|
-
class
|
344
|
+
class XRefExtraction < CodeExtraction
|
336
345
|
def_registrant_phase Cc1::Prepare2Phase
|
337
346
|
|
338
347
|
def initialize(phase_ctxt)
|
@@ -359,36 +368,47 @@ module CBuiltin #:nodoc:
|
|
359
368
|
end
|
360
369
|
|
361
370
|
def extract_variable_read(expr, var)
|
362
|
-
if
|
371
|
+
if var.scope.global? && var.named?
|
363
372
|
# NOTE: When a value of the inner-variable of array or composite object
|
364
373
|
# is referred, dependency record of only outmost-variable access
|
365
374
|
# should be output.
|
366
375
|
var = var.owner while var.inner?
|
367
|
-
|
368
|
-
|
369
|
-
|
376
|
+
|
377
|
+
if @accessor
|
378
|
+
referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s)
|
379
|
+
else
|
380
|
+
referrer = FunctionId.of_ctors_section
|
381
|
+
end
|
382
|
+
XREF_VAR(expr.location, referrer, "R", var.name)
|
370
383
|
end
|
371
384
|
end
|
372
385
|
|
373
386
|
def extract_variable_write(expr, var)
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
387
|
+
# NOTE: When a value of the inner-variable of array or composite
|
388
|
+
# object is updated, dependency record of the inner-variable
|
389
|
+
# access should not be output and the outer variable's value
|
390
|
+
# will also be notified later.
|
391
|
+
return if var.inner?
|
392
|
+
|
393
|
+
if var.scope.global? && var.named?
|
394
|
+
if @accessor
|
395
|
+
referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s)
|
396
|
+
else
|
397
|
+
referrer = FunctionId.of_ctors_section
|
383
398
|
end
|
399
|
+
XREF_VAR(expr.location, referrer, "W", var.name)
|
384
400
|
end
|
385
401
|
end
|
386
402
|
|
387
403
|
def extract_function_reference(expr, fun)
|
388
|
-
if
|
389
|
-
|
390
|
-
|
391
|
-
|
404
|
+
if fun.named?
|
405
|
+
if @accessor
|
406
|
+
referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s)
|
407
|
+
else
|
408
|
+
referrer = FunctionId.of_ctors_section
|
409
|
+
end
|
410
|
+
XREF_FUNC(expr.location, referrer, "R",
|
411
|
+
FunctionId.new(fun.name, fun.signature.to_s))
|
392
412
|
end
|
393
413
|
end
|
394
414
|
end
|
@@ -398,9 +418,9 @@ module CBuiltin #:nodoc:
|
|
398
418
|
|
399
419
|
def initialize(phase_ctxt)
|
400
420
|
super
|
401
|
-
|
402
|
-
|
403
|
-
|
421
|
+
traversal = phase_ctxt[:cc1_ast_traversal]
|
422
|
+
traversal.enter_constant_specifier += T(:extract_constant)
|
423
|
+
traversal.enter_string_literal_specifier += T(:extract_string_literal)
|
404
424
|
end
|
405
425
|
|
406
426
|
private
|