From 0978bccda885caba40ca3c3b2284b772ad24492c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Aug 2015 00:34:47 +0300 Subject: Update test 42. --- test/test42-01.txt | 565 ++++++++++++++++++++++++++++++++++++++++++++--------- test/test42-02.txt | 4 + test/test42-03.txt | 92 ++++++++- test/test42-04.txt | 8 +- test/test42-05.txt | 8 +- test/test42.cpp | 31 ++- 6 files changed, 610 insertions(+), 98 deletions(-) diff --git a/test/test42-01.txt b/test/test42-01.txt index a0434ef..734f382 100644 --- a/test/test42-01.txt +++ b/test/test42-01.txt @@ -59,7 +59,68 @@ function_decl getData3 test42.cpp 9:12 2147483647 record_type 3 - nested type type_decl Data1 test42.cpp 1:8 2 - type name - isAutogenerated: 1 -function_decl getData3 test42.cpp 22:20 2147483647 +function_decl getData2 test42.cpp 23:12 2147483647 +- isPublic: 1 + method_type 2147483646 - function type + pointer_type 2147483645 - method return type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + record_type 2147483645 - method base type + type_decl Data1 test42.cpp 15:8 2147483644 - type name + - isAutogenerated: 1 + tree_list 2147483645 - arg types + pointer_type 2147483644 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 2147483644 - chain + void_type 2147483643 - value + type_decl void 0:0 2147483642 - type name + - isAutogenerated: 1 + result_decl test42.cpp 24:5 2147483646 - function result + - isAutogenerated: 1 + pointer_type 2147483645 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - decl size + - isUsed: 1 + parm_decl this test42.cpp 23:21 2147483646 - argument + - isAutogenerated: 1 + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + return_expr test42.cpp 25:16 2147483646 - code + init_expr 2147483645 - operand + result_decl test42.cpp 24:5 2147483644 - operand + - isAutogenerated: 1 + pointer_type 2147483643 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483643 - decl size + component_ref test42.cpp 25:16 2147483644 - operand + indirect_ref 2147483643 - object + nop_expr 2147483642 - ref + - isUsed: 1 + parm_decl this test42.cpp 23:21 2147483641 - operand + - isAutogenerated: 1 + pointer_type 2147483640 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483640 - parm size + field_decl ptrval test42.cpp 18:12 2147483643 - field + - unsigned + integer_cst 64 2147483642 - decl size + pointer_type 5 - field type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 +function_decl getData3 test42.cpp 28:20 2147483647 - isVirtual: 1 - isPublic: 1 method_type 2147483646 - function type @@ -89,7 +150,7 @@ function_decl getData3 test42.cpp 22:20 2147483647 void_type 2147483642 - value type_decl void 0:0 2147483641 - type name - isAutogenerated: 1 - result_decl test42.cpp 23:5 2147483646 - function result + result_decl test42.cpp 29:5 2147483646 - function result - isAutogenerated: 1 pointer_type 2147483645 - result type record_type 3 - nested type @@ -97,7 +158,7 @@ function_decl getData3 test42.cpp 22:20 2147483647 - isAutogenerated: 1 integer_cst 64 2147483645 - decl size - isUsed: 1 - parm_decl this test42.cpp 22:35 2147483646 - argument + parm_decl this test42.cpp 28:35 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type @@ -105,7 +166,7 @@ function_decl getData3 test42.cpp 22:20 2147483647 - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - isUsed: 1 - parm_decl k test42.cpp 22:34 2147483646 - argument + parm_decl k test42.cpp 28:34 2147483646 - argument reference_type 2147483645 - decl type integer_type 2147483644 - nested type - precisionBits: 32 @@ -117,15 +178,15 @@ function_decl getData3 test42.cpp 22:20 2147483647 integer_cst 2147483647 2147483643 - max value integer_cst 64 2147483645 - parm size statement_list 2147483646 - code - cleanup_point_expr test42.cpp 24:16 2147483645 - statement - expr_stmt test42.cpp 24:16 2147483644 - operand + cleanup_point_expr test42.cpp 30:16 2147483645 - statement + expr_stmt test42.cpp 30:16 2147483644 - operand convert_expr 2147483643 - expresssion modify_expr 2147483642 - operand - component_ref test42.cpp 24:9 2147483641 - operand + component_ref test42.cpp 30:9 2147483641 - operand indirect_ref 2147483640 - object nop_expr 2147483639 - ref - isUsed: 1 - parm_decl this test42.cpp 22:35 2147483638 - operand + parm_decl this test42.cpp 28:35 2147483638 - operand - isAutogenerated: 1 pointer_type 2147483637 - decl type record_type 3 - nested type @@ -145,7 +206,7 @@ function_decl getData3 test42.cpp 22:20 2147483647 integer_cst 2147483647 4 - max value indirect_ref 2147483641 - operand - isUsed: 1 - parm_decl k test42.cpp 22:34 2147483640 - ref + parm_decl k test42.cpp 28:34 2147483640 - ref reference_type 2147483639 - decl type integer_type 2147483638 - nested type - precisionBits: 32 @@ -156,20 +217,20 @@ function_decl getData3 test42.cpp 22:20 2147483647 integer_cst -2147483648 2147483637 - min value integer_cst 2147483647 2147483637 - max value integer_cst 64 2147483639 - parm size - return_expr test42.cpp 25:16 2147483645 - statement + return_expr test42.cpp 31:16 2147483645 - statement init_expr 2147483644 - operand - result_decl test42.cpp 23:5 2147483643 - operand + result_decl test42.cpp 29:5 2147483643 - operand - isAutogenerated: 1 pointer_type 2147483642 - result type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483642 - decl size - component_ref test42.cpp 25:16 2147483643 - operand + component_ref test42.cpp 31:16 2147483643 - operand indirect_ref 2147483642 - object nop_expr 2147483641 - ref - isUsed: 1 - parm_decl this test42.cpp 22:35 2147483640 - operand + parm_decl this test42.cpp 28:35 2147483640 - operand - isAutogenerated: 1 pointer_type 2147483639 - decl type record_type 3 - nested type @@ -183,7 +244,7 @@ function_decl getData3 test42.cpp 22:20 2147483647 record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 -function_decl getData4 test42.cpp 27:19 2147483647 +function_decl getData4 test42.cpp 33:19 2147483647 - isPublic: 1 function_type 2147483646 - function type pointer_type 2147483645 - function return type @@ -194,16 +255,16 @@ function_decl getData4 test42.cpp 27:19 2147483647 void_type 2147483644 - value type_decl void 0:0 2147483643 - type name - isAutogenerated: 1 - result_decl test42.cpp 28:5 2147483646 - function result + result_decl test42.cpp 34:5 2147483646 - function result - isAutogenerated: 1 pointer_type 2147483645 - result type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - decl size - return_expr test42.cpp 29:16 2147483646 - code + return_expr test42.cpp 35:16 2147483646 - code init_expr 2147483645 - operand - result_decl test42.cpp 28:5 2147483644 - operand + result_decl test42.cpp 34:5 2147483644 - operand - isAutogenerated: 1 pointer_type 2147483643 - result type record_type 3 - nested type @@ -211,7 +272,7 @@ function_decl getData4 test42.cpp 27:19 2147483647 - isAutogenerated: 1 integer_cst 64 2147483643 - decl size integer_cst 0 2147483644 - operand -function_decl getData5 test42.cpp 31:12 2147483647 +function_decl getData5 test42.cpp 37:12 2147483647 - isPublic: 1 method_type 2147483646 - function type tree_list 2147483645 - attribute @@ -232,7 +293,7 @@ function_decl getData5 test42.cpp 31:12 2147483647 void_type 2147483643 - value type_decl void 0:0 2147483642 - type name - isAutogenerated: 1 - result_decl test42.cpp 32:5 2147483646 - function result + result_decl test42.cpp 38:5 2147483646 - function result - isAutogenerated: 1 pointer_type 2147483645 - result type record_type 3 - nested type @@ -240,16 +301,16 @@ function_decl getData5 test42.cpp 31:12 2147483647 - isAutogenerated: 1 integer_cst 64 2147483645 - decl size - isUsed: 1 - parm_decl this test42.cpp 31:54 2147483646 - argument + parm_decl this test42.cpp 37:54 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - return_expr test42.cpp 33:17 2147483646 - code + return_expr test42.cpp 39:17 2147483646 - code init_expr 2147483645 - operand - result_decl test42.cpp 32:5 2147483644 - operand + result_decl test42.cpp 38:5 2147483644 - operand - isAutogenerated: 1 pointer_type 2147483643 - result type record_type 3 - nested type @@ -257,11 +318,11 @@ function_decl getData5 test42.cpp 31:12 2147483647 - isAutogenerated: 1 integer_cst 64 2147483643 - decl size addr_expr 2147483644 - operand - component_ref test42.cpp 33:17 2147483643 - operand + component_ref test42.cpp 39:17 2147483643 - operand indirect_ref 2147483642 - object nop_expr 2147483641 - ref - isUsed: 1 - parm_decl this test42.cpp 31:54 2147483640 - operand + parm_decl this test42.cpp 37:54 2147483640 - operand - isAutogenerated: 1 pointer_type 2147483639 - decl type record_type 3 - nested type @@ -274,7 +335,7 @@ function_decl getData5 test42.cpp 31:12 2147483647 record_type 5 - field type type_decl Data2 test42.cpp 4:8 4 - type name - isAutogenerated: 1 -function_decl getData1 test42.cpp 50:12 2147483647 +function_decl getData1 test42.cpp 56:12 2147483647 - isPublic: 1 method_type 2147483646 - function type pointer_type 2147483645 - method return type @@ -282,18 +343,18 @@ function_decl getData1 test42.cpp 50:12 2147483647 type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 record_type 2147483645 - method base type - type_decl Object1 test42.cpp 44:7 2147483644 - type name + type_decl Object1 test42.cpp 50:7 2147483644 - type name - isAutogenerated: 1 tree_list 2147483645 - arg types pointer_type 2147483644 - value record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 tree_list 2147483644 - chain void_type 2147483643 - value type_decl void 0:0 2147483642 - type name - isAutogenerated: 1 - result_decl test42.cpp 51:5 2147483646 - function result + result_decl test42.cpp 57:5 2147483646 - function result - isAutogenerated: 1 pointer_type 2147483645 - result type record_type 3 - nested type @@ -301,41 +362,41 @@ function_decl getData1 test42.cpp 50:12 2147483647 - isAutogenerated: 1 integer_cst 64 2147483645 - decl size - isUsed: 1 - parm_decl this test42.cpp 50:21 2147483646 - argument + parm_decl this test42.cpp 56:21 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - return_expr test42.cpp 52:16 2147483646 - code + return_expr test42.cpp 58:16 2147483646 - code init_expr 2147483645 - operand - result_decl test42.cpp 51:5 2147483644 - operand + result_decl test42.cpp 57:5 2147483644 - operand - isAutogenerated: 1 pointer_type 2147483643 - result type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483643 - decl size - component_ref test42.cpp 52:16 2147483644 - operand + component_ref test42.cpp 58:16 2147483644 - operand indirect_ref 2147483643 - object nop_expr 2147483642 - ref - isUsed: 1 - parm_decl this test42.cpp 50:21 2147483641 - operand + parm_decl this test42.cpp 56:21 2147483641 - operand - isAutogenerated: 1 pointer_type 2147483640 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483640 - parm size - field_decl tmp2 test42.cpp 47:12 2147483643 - field + field_decl tmp2 test42.cpp 53:12 2147483643 - field - unsigned integer_cst 64 2147483642 - decl size pointer_type 5 - field type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 -function_decl getData2 test42.cpp 55:12 2147483647 +function_decl getData2 test42.cpp 61:12 2147483647 - isPublic: 1 method_type 2147483646 - function type pointer_type 2147483645 - method return type @@ -343,18 +404,18 @@ function_decl getData2 test42.cpp 55:12 2147483647 type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 record_type 2147483645 - method base type - type_decl Object1 test42.cpp 44:7 2147483644 - type name + type_decl Object1 test42.cpp 50:7 2147483644 - type name - isAutogenerated: 1 tree_list 2147483645 - arg types pointer_type 2147483644 - value record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 tree_list 2147483644 - chain void_type 2147483643 - value type_decl void 0:0 2147483642 - type name - isAutogenerated: 1 - result_decl test42.cpp 56:5 2147483646 - function result + result_decl test42.cpp 62:5 2147483646 - function result - isAutogenerated: 1 pointer_type 2147483645 - result type record_type 3 - nested type @@ -362,53 +423,53 @@ function_decl getData2 test42.cpp 55:12 2147483647 - isAutogenerated: 1 integer_cst 64 2147483645 - decl size - isUsed: 1 - parm_decl this test42.cpp 55:21 2147483646 - argument + parm_decl this test42.cpp 61:21 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - return_expr test42.cpp 57:16 2147483646 - code + return_expr test42.cpp 63:16 2147483646 - code init_expr 2147483645 - operand - result_decl test42.cpp 56:5 2147483644 - operand + result_decl test42.cpp 62:5 2147483644 - operand - isAutogenerated: 1 pointer_type 2147483643 - result type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483643 - decl size - component_ref test42.cpp 57:16 2147483644 - operand + component_ref test42.cpp 63:16 2147483644 - operand indirect_ref 2147483643 - object nop_expr 2147483642 - ref - isUsed: 1 - parm_decl this test42.cpp 55:21 2147483641 - operand + parm_decl this test42.cpp 61:21 2147483641 - operand - isAutogenerated: 1 pointer_type 2147483640 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483640 - parm size - field_decl tmp2 test42.cpp 47:12 2147483643 - field + field_decl tmp2 test42.cpp 53:12 2147483643 - field - unsigned integer_cst 64 2147483642 - decl size pointer_type 5 - field type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 -function_decl func1 test42.cpp 60:10 2147483647 +function_decl func1 test42.cpp 66:10 2147483647 - isPublic: 1 method_type 2147483646 - function type void_type 2147483645 - method return type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 record_type 2147483645 - method base type - type_decl Object1 test42.cpp 44:7 2147483644 - type name + type_decl Object1 test42.cpp 50:7 2147483644 - type name - isAutogenerated: 1 tree_list 2147483645 - arg types pointer_type 2147483644 - value record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 tree_list 2147483644 - chain pointer_type 2147483643 - value @@ -419,44 +480,44 @@ function_decl func1 test42.cpp 60:10 2147483647 void_type 2147483642 - value type_decl void 0:0 2147483641 - type name - isAutogenerated: 1 - result_decl test42.cpp 61:5 2147483646 - function result + result_decl test42.cpp 67:5 2147483646 - function result - isAutogenerated: 1 void_type 2147483645 - result type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 - isUsed: 1 - parm_decl this test42.cpp 60:29 2147483646 - argument + parm_decl this test42.cpp 66:29 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - parm_decl ptr1 test42.cpp 60:23 2147483646 - argument + parm_decl ptr1 test42.cpp 66:23 2147483646 - argument pointer_type 2147483645 - decl type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - cleanup_point_expr test42.cpp 62:24 2147483646 - code - expr_stmt test42.cpp 62:24 2147483645 - operand + cleanup_point_expr test42.cpp 68:24 2147483646 - code + expr_stmt test42.cpp 68:24 2147483645 - operand convert_expr 2147483644 - expresssion modify_expr 2147483643 - operand - component_ref test42.cpp 62:15 2147483642 - operand + component_ref test42.cpp 68:15 2147483642 - operand indirect_ref 2147483641 - object nop_expr 2147483640 - ref - component_ref test42.cpp 62:9 2147483639 - operand + component_ref test42.cpp 68:9 2147483639 - operand indirect_ref 2147483638 - object nop_expr 2147483637 - ref - isUsed: 1 - parm_decl this test42.cpp 60:29 2147483636 - operand + parm_decl this test42.cpp 66:29 2147483636 - operand - isAutogenerated: 1 pointer_type 2147483635 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483635 - parm size - field_decl tmp1 test42.cpp 46:12 2147483638 - field + field_decl tmp1 test42.cpp 52:12 2147483638 - field - unsigned integer_cst 64 2147483637 - decl size pointer_type 5 - field type @@ -475,19 +536,19 @@ function_decl func1 test42.cpp 60:10 2147483647 integer_cst -2147483648 4 - min value integer_cst 2147483647 4 - max value integer_cst 100 2147483642 - operand -function_decl func2 test42.cpp 65:10 2147483647 +function_decl func2 test42.cpp 71:10 2147483647 - isPublic: 1 method_type 2147483646 - function type void_type 2147483645 - method return type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 record_type 2147483645 - method base type - type_decl Object1 test42.cpp 44:7 2147483644 - type name + type_decl Object1 test42.cpp 50:7 2147483644 - type name - isAutogenerated: 1 tree_list 2147483645 - arg types pointer_type 2147483644 - value record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 tree_list 2147483644 - chain pointer_type 2147483643 - value @@ -498,53 +559,53 @@ function_decl func2 test42.cpp 65:10 2147483647 void_type 2147483642 - value type_decl void 0:0 2147483641 - type name - isAutogenerated: 1 - result_decl test42.cpp 66:5 2147483646 - function result + result_decl test42.cpp 72:5 2147483646 - function result - isAutogenerated: 1 void_type 2147483645 - result type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 - isUsed: 1 - parm_decl this test42.cpp 65:29 2147483646 - argument + parm_decl this test42.cpp 71:29 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - parm_decl ptr1 test42.cpp 65:23 2147483646 - argument + parm_decl ptr1 test42.cpp 71:23 2147483646 - argument pointer_type 2147483645 - decl type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - cleanup_point_expr test42.cpp 67:24 2147483646 - code - expr_stmt test42.cpp 67:24 2147483645 - operand + cleanup_point_expr test42.cpp 73:24 2147483646 - code + expr_stmt test42.cpp 73:24 2147483645 - operand convert_expr 2147483644 - expresssion modify_expr 2147483643 - operand - component_ref test42.cpp 67:15 2147483642 - operand + component_ref test42.cpp 73:15 2147483642 - operand indirect_ref 2147483641 - object nop_expr 2147483640 - ref - component_ref test42.cpp 67:9 2147483639 - operand + component_ref test42.cpp 73:9 2147483639 - operand indirect_ref 2147483638 - object nop_expr 2147483637 - ref - isUsed: 1 - parm_decl this test42.cpp 65:29 2147483636 - operand + parm_decl this test42.cpp 71:29 2147483636 - operand - isAutogenerated: 1 pointer_type 2147483635 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483635 - parm size - field_decl tmp3 test42.cpp 48:47 2147483638 - field + field_decl tmp3 test42.cpp 54:47 2147483638 - field - unsigned tree_list 2147483637 - attribute identifier_node nonnullpointer 2147483636 - purpose integer_cst 64 2147483637 - decl size pointer_type 5 - field type record_type 3 - nested type - type_decl Data2 test42.cpp 4:8 2 - type name + type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 - field_decl val test42.cpp 6:9 2147483641 - field + field_decl val test42.cpp 17:9 2147483641 - field - signed integer_cst 32 2147483640 - decl size integer_type 5 - field type @@ -556,19 +617,19 @@ function_decl func2 test42.cpp 65:10 2147483647 integer_cst -2147483648 4 - min value integer_cst 2147483647 4 - max value integer_cst 100 2147483642 - operand -function_decl func3 test42.cpp 70:10 2147483647 +function_decl func3 test42.cpp 76:10 2147483647 - isPublic: 1 method_type 2147483646 - function type void_type 2147483645 - method return type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 record_type 2147483645 - method base type - type_decl Object1 test42.cpp 44:7 2147483644 - type name + type_decl Object1 test42.cpp 50:7 2147483644 - type name - isAutogenerated: 1 tree_list 2147483645 - arg types pointer_type 2147483644 - value record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 tree_list 2147483644 - chain pointer_type 2147483643 - value @@ -579,31 +640,31 @@ function_decl func3 test42.cpp 70:10 2147483647 void_type 2147483642 - value type_decl void 0:0 2147483641 - type name - isAutogenerated: 1 - result_decl test42.cpp 71:5 2147483646 - function result + result_decl test42.cpp 77:5 2147483646 - function result - isAutogenerated: 1 void_type 2147483645 - result type type_decl void 0:0 2147483644 - type name - isAutogenerated: 1 - parm_decl this test42.cpp 70:29 2147483646 - argument + parm_decl this test42.cpp 76:29 2147483646 - argument - isAutogenerated: 1 pointer_type 2147483645 - decl type record_type 3 - nested type - type_decl Object1 test42.cpp 44:7 2 - type name + type_decl Object1 test42.cpp 50:7 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - parm_decl ptr1 test42.cpp 70:23 2147483646 - argument + parm_decl ptr1 test42.cpp 76:23 2147483646 - argument pointer_type 2147483645 - decl type record_type 3 - nested type type_decl Data1 test42.cpp 15:8 2 - type name - isAutogenerated: 1 integer_cst 64 2147483645 - parm size - cleanup_point_expr test42.cpp 72:25 2147483646 - code - expr_stmt test42.cpp 72:25 2147483645 - operand + cleanup_point_expr test42.cpp 78:25 2147483646 - code + expr_stmt test42.cpp 78:25 2147483645 - operand convert_expr 2147483644 - expresssion modify_expr 2147483643 - operand - component_ref test42.cpp 72:16 2147483642 - operand + component_ref test42.cpp 78:16 2147483642 - operand indirect_ref 2147483641 - object - var_decl gptr1 test42.cpp 39:8 2147483640 - ref + var_decl gptr1 test42.cpp 45:8 2147483640 - ref - isUsed: 1 integer_cst 64 2147483639 - decl size pointer_type 2147483639 - var type @@ -622,3 +683,329 @@ function_decl func3 test42.cpp 70:10 2147483647 integer_cst -2147483648 4 - min value integer_cst 2147483647 4 - max value integer_cst 100 2147483642 - operand +function_decl func4 test42.cpp 81:10 2147483647 +- isPublic: 1 + method_type 2147483646 - function type + void_type 2147483645 - method return type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + record_type 2147483645 - method base type + type_decl Object1 test42.cpp 50:7 2147483644 - type name + - isAutogenerated: 1 + tree_list 2147483645 - arg types + pointer_type 2147483644 - value + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + tree_list 2147483644 - chain + pointer_type 2147483643 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 2147483643 - chain + void_type 2147483642 - value + type_decl void 0:0 2147483641 - type name + - isAutogenerated: 1 + result_decl test42.cpp 82:5 2147483646 - function result + - isAutogenerated: 1 + void_type 2147483645 - result type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + parm_decl this test42.cpp 81:29 2147483646 - argument + - isAutogenerated: 1 + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + parm_decl ptr1 test42.cpp 81:23 2147483646 - argument + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + cleanup_point_expr test42.cpp 83:25 2147483646 - code + expr_stmt test42.cpp 83:25 2147483645 - operand + convert_expr 2147483644 - expresssion + modify_expr 2147483643 - operand + component_ref test42.cpp 83:16 2147483642 - operand + indirect_ref 2147483641 - object + var_decl gptr2 test42.cpp 46:8 2147483640 - ref + - isUsed: 1 + tree_list 2147483639 - attribute + identifier_node nonnullpointer 2147483638 - purpose + integer_cst 64 2147483639 - decl size + pointer_type 2147483639 - var type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + field_decl val test42.cpp 17:9 2147483641 - field + - signed + integer_cst 32 2147483640 - decl size + integer_type 5 - field type + - precisionBits: 32 + - signed + type_decl int 0:0 4 - type name + - isAutogenerated: 1 + integer_cst 32 4 - type size + integer_cst -2147483648 4 - min value + integer_cst 2147483647 4 - max value + integer_cst 100 2147483642 - operand +function_decl func5 test42.cpp 86:10 2147483647 +- isPublic: 1 + method_type 2147483646 - function type + void_type 2147483645 - method return type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + record_type 2147483645 - method base type + type_decl Object1 test42.cpp 50:7 2147483644 - type name + - isAutogenerated: 1 + tree_list 2147483645 - arg types + pointer_type 2147483644 - value + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + tree_list 2147483644 - chain + pointer_type 2147483643 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 2147483643 - chain + void_type 2147483642 - value + type_decl void 0:0 2147483641 - type name + - isAutogenerated: 1 + result_decl test42.cpp 87:5 2147483646 - function result + - isAutogenerated: 1 + void_type 2147483645 - result type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + - isUsed: 1 + parm_decl this test42.cpp 86:29 2147483646 - argument + - isAutogenerated: 1 + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + parm_decl ptr1 test42.cpp 86:23 2147483646 - argument + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + cleanup_point_expr test42.cpp 88:25 2147483646 - code + expr_stmt test42.cpp 88:25 2147483645 - operand + convert_expr 2147483644 - expresssion + call_expr test42.cpp 88:23 2147483643 - operand + addr_expr 2147483642 - function + function_decl getData2 test42.cpp 23:12 20 - operand + - isExternal: 1 + - isPublic: 1 + method_type 19 - function type + pointer_type 18 - method return type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + record_type 18 - method base type + type_decl Data1 test42.cpp 15:8 17 - type name + - isAutogenerated: 1 + tree_list 18 - arg types + pointer_type 17 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 17 - chain + void_type 16 - value + type_decl void 0:0 15 - type name + - isAutogenerated: 1 + result_decl test42.cpp 24:5 19 - function result + - isAutogenerated: 1 + pointer_type 18 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 18 - decl size + - isUsed: 1 + parm_decl this test42.cpp 23:21 19 - argument + - isAutogenerated: 1 + pointer_type 18 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 18 - parm size + return_expr test42.cpp 25:16 19 - code + init_expr 18 - operand + result_decl test42.cpp 24:5 17 - operand + - isAutogenerated: 1 + pointer_type 16 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 16 - decl size + component_ref test42.cpp 25:16 17 - operand + indirect_ref 16 - object + nop_expr 15 - ref + - isUsed: 1 + parm_decl this test42.cpp 23:21 14 - operand + - isAutogenerated: 1 + pointer_type 13 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 13 - parm size + field_decl ptrval test42.cpp 18:12 16 - field + - unsigned + integer_cst 64 15 - decl size + pointer_type 5 - field type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + nop_expr 2147483642 - arg + component_ref test42.cpp 88:9 2147483641 - operand + indirect_ref 2147483640 - object + nop_expr 2147483639 - ref + - isUsed: 1 + parm_decl this test42.cpp 86:29 2147483638 - operand + - isAutogenerated: 1 + pointer_type 2147483637 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483637 - parm size + field_decl tmp1 test42.cpp 52:12 2147483640 - field + - unsigned + integer_cst 64 2147483639 - decl size + pointer_type 5 - field type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 +function_decl func6 test42.cpp 91:10 2147483647 +- isPublic: 1 + method_type 2147483646 - function type + void_type 2147483645 - method return type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + record_type 2147483645 - method base type + type_decl Object1 test42.cpp 50:7 2147483644 - type name + - isAutogenerated: 1 + tree_list 2147483645 - arg types + pointer_type 2147483644 - value + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + tree_list 2147483644 - chain + pointer_type 2147483643 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 2147483643 - chain + void_type 2147483642 - value + type_decl void 0:0 2147483641 - type name + - isAutogenerated: 1 + result_decl test42.cpp 92:5 2147483646 - function result + - isAutogenerated: 1 + void_type 2147483645 - result type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + - isUsed: 1 + parm_decl this test42.cpp 91:29 2147483646 - argument + - isAutogenerated: 1 + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + parm_decl ptr1 test42.cpp 91:23 2147483646 - argument + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + cleanup_point_expr test42.cpp 93:25 2147483646 - code + expr_stmt test42.cpp 93:25 2147483645 - operand + convert_expr 2147483644 - expresssion + call_expr test42.cpp 93:23 2147483643 - operand + addr_expr 2147483642 - function + function_decl getData2 test42.cpp 23:12 20 - operand + - isExternal: 1 + - isPublic: 1 + method_type 19 - function type + pointer_type 18 - method return type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + record_type 18 - method base type + type_decl Data1 test42.cpp 15:8 17 - type name + - isAutogenerated: 1 + tree_list 18 - arg types + pointer_type 17 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 17 - chain + void_type 16 - value + type_decl void 0:0 15 - type name + - isAutogenerated: 1 + result_decl test42.cpp 24:5 19 - function result + - isAutogenerated: 1 + pointer_type 18 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 18 - decl size + - isUsed: 1 + parm_decl this test42.cpp 23:21 19 - argument + - isAutogenerated: 1 + pointer_type 18 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 18 - parm size + return_expr test42.cpp 25:16 19 - code + init_expr 18 - operand + result_decl test42.cpp 24:5 17 - operand + - isAutogenerated: 1 + pointer_type 16 - result type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 16 - decl size + component_ref test42.cpp 25:16 17 - operand + indirect_ref 16 - object + nop_expr 15 - ref + - isUsed: 1 + parm_decl this test42.cpp 23:21 14 - operand + - isAutogenerated: 1 + pointer_type 13 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 13 - parm size + field_decl ptrval test42.cpp 18:12 16 - field + - unsigned + integer_cst 64 15 - decl size + pointer_type 5 - field type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + nop_expr 2147483642 - arg + component_ref test42.cpp 93:9 2147483641 - operand + indirect_ref 2147483640 - object + nop_expr 2147483639 - ref + - isUsed: 1 + parm_decl this test42.cpp 91:29 2147483638 - operand + - isAutogenerated: 1 + pointer_type 2147483637 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 50:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483637 - parm size + field_decl tmp3 test42.cpp 54:47 2147483640 - field + - unsigned + tree_list 2147483639 - attribute + identifier_node nonnullpointer 2147483638 - purpose + integer_cst 64 2147483639 - decl size + pointer_type 5 - field type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 diff --git a/test/test42-02.txt b/test/test42-02.txt index 7e14625..f01c759 100644 --- a/test/test42-02.txt +++ b/test/test42-02.txt @@ -1,4 +1,5 @@ getData3: +getData2: getData3: getData4: getData5: @@ -7,3 +8,6 @@ getData2: func1: pointer_type ptr1, func2: pointer_type ptr1, func3: pointer_type ptr1, +func4: pointer_type ptr1, +func5: pointer_type ptr1, +func6: pointer_type ptr1, diff --git a/test/test42-03.txt b/test/test42-03.txt index aa25810..2e01c95 100644 --- a/test/test42-03.txt +++ b/test/test42-03.txt @@ -18,6 +18,26 @@ integer_cst 64: pointer_type : record_type : type_decl Data1: +function_decl getData2: +return_expr : +init_expr : +result_decl : +pointer_type : +record_type : +type_decl Data1: +integer_cst 64: +component_ref : +indirect_ref : +parm_decl this: +pointer_type : +record_type : +type_decl Data1: +integer_cst 64: +field_decl ptrval: +integer_cst 64: +pointer_type : +record_type : +type_decl Data1: function_decl getData3: statement_list : cleanup_point_expr : @@ -141,7 +161,7 @@ expr_stmt : ptr1, convert_expr : ptr1, modify_expr : ptr1, test42.cpp: In member function 'void Object1::func1(Data1*) const': -test42.cpp:62:24: warning: Using variable 'this->tmp1' without checking for null pointer +test42.cpp:68:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 100; ^ component_ref : ptr1, @@ -186,7 +206,7 @@ identifier_node nonnullpointer: ptr1, integer_cst 64: ptr1, pointer_type : ptr1, record_type : ptr1, -type_decl Data2: ptr1, +type_decl Data1: ptr1, field_decl val: ptr1, integer_cst 32: ptr1, integer_type : ptr1, @@ -201,7 +221,7 @@ expr_stmt : ptr1, convert_expr : ptr1, modify_expr : ptr1, test42.cpp: In member function 'void Object1::func3(Data1*) const': -test42.cpp:72:25: warning: Using variable 'gptr1' without checking for null pointer +test42.cpp:78:25: warning: Using variable 'gptr1' without checking for null pointer gptr1->val = 100; ^ component_ref : ptr1, @@ -219,3 +239,69 @@ integer_cst 32: ptr1, integer_cst -2147483648: ptr1, integer_cst 2147483647: ptr1, integer_cst 100: ptr1, +function_decl func4: +cleanup_point_expr : ptr1, +expr_stmt : ptr1, +convert_expr : ptr1, +modify_expr : ptr1, +component_ref : ptr1, +indirect_ref : ptr1, +var_decl gptr2: ptr1, +tree_list : ptr1, +identifier_node nonnullpointer: ptr1, +integer_cst 64: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Data1: ptr1, +field_decl val: ptr1, +integer_cst 32: ptr1, +integer_type : ptr1, +type_decl int: ptr1, +integer_cst 32: ptr1, +integer_cst -2147483648: ptr1, +integer_cst 2147483647: ptr1, +integer_cst 100: ptr1, +function_decl func5: +cleanup_point_expr : ptr1, +expr_stmt : ptr1, +convert_expr : ptr1, +call_expr : ptr1, +addr_expr : ptr1, +function_decl getData2: ptr1, +test42.cpp: In member function 'void Object1::func5(Data1*) const': +test42.cpp:88:23: warning: Using variable 'this->tmp1' without checking for null pointer + tmp1->getData2(); + ^ +component_ref : ptr1, +indirect_ref : ptr1, +parm_decl this: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Object1: ptr1, +integer_cst 64: ptr1, +field_decl tmp1: ptr1, +integer_cst 64: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Data1: ptr1, +function_decl func6: +cleanup_point_expr : ptr1, +expr_stmt : ptr1, +convert_expr : ptr1, +call_expr : ptr1, +addr_expr : ptr1, +function_decl getData2: ptr1, +component_ref : ptr1, +indirect_ref : ptr1, +parm_decl this: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Object1: ptr1, +integer_cst 64: ptr1, +field_decl tmp3: ptr1, +tree_list : ptr1, +identifier_node nonnullpointer: ptr1, +integer_cst 64: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Data1: ptr1, diff --git a/test/test42-04.txt b/test/test42-04.txt index eca7fdc..6d780d1 100644 --- a/test/test42-04.txt +++ b/test/test42-04.txt @@ -1,8 +1,12 @@ test42.cpp: In member function 'void Object1::func1(Data1*) const': -test42.cpp:62:24: warning: Using variable 'this->tmp1' without checking for null pointer +test42.cpp:68:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 100; ^ test42.cpp: In member function 'void Object1::func3(Data1*) const': -test42.cpp:72:25: warning: Using variable 'gptr1' without checking for null pointer +test42.cpp:78:25: warning: Using variable 'gptr1' without checking for null pointer gptr1->val = 100; ^ +test42.cpp: In member function 'void Object1::func5(Data1*) const': +test42.cpp:88:23: warning: Using variable 'this->tmp1' without checking for null pointer + tmp1->getData2(); + ^ diff --git a/test/test42-05.txt b/test/test42-05.txt index eca7fdc..6d780d1 100644 --- a/test/test42-05.txt +++ b/test/test42-05.txt @@ -1,8 +1,12 @@ test42.cpp: In member function 'void Object1::func1(Data1*) const': -test42.cpp:62:24: warning: Using variable 'this->tmp1' without checking for null pointer +test42.cpp:68:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 100; ^ test42.cpp: In member function 'void Object1::func3(Data1*) const': -test42.cpp:72:25: warning: Using variable 'gptr1' without checking for null pointer +test42.cpp:78:25: warning: Using variable 'gptr1' without checking for null pointer gptr1->val = 100; ^ +test42.cpp: In member function 'void Object1::func5(Data1*) const': +test42.cpp:88:23: warning: Using variable 'this->tmp1' without checking for null pointer + tmp1->getData2(); + ^ diff --git a/test/test42.cpp b/test/test42.cpp index 1f5bfbe..782351c 100644 --- a/test/test42.cpp +++ b/test/test42.cpp @@ -19,6 +19,12 @@ struct Data1 Data2 perm; int arr[3]; virtual ~Data1(); + + Data1 *getData2() + { + return ptrval; + } + virtual Data1 *getData3(int &k) { val = k; @@ -45,7 +51,7 @@ class Object1 { Data1 *tmp1; Data1 *tmp2; - Data2 *tmp3 __attribute__((nonnullpointer)); + Data1 *tmp3 __attribute__((nonnullpointer)); Data1 *getData1() { @@ -72,10 +78,31 @@ class Object1 gptr1->val = 100; } -/* void func4(Data1 *ptr1) const { gptr2->val = 100; } + + void func5(Data1 *ptr1) const + { + tmp1->getData2(); + } + + void func6(Data1 *ptr1) const + { + tmp3->getData2(); + } + +/* + broken for now + void func6(Data1 *ptr1) const + { + tmp3->getData2()->val = 100; + } + + void func7(Data1 *ptr1) const + { + tmp1->getData2()->val = 100; + } */ }; -- cgit v1.2.3-60-g2f50