diff options
Diffstat (limited to 'gcc/analyzer/region-model-manager.cc')
-rw-r--r-- | gcc/analyzer/region-model-manager.cc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/analyzer/region-model-manager.cc b/gcc/analyzer/region-model-manager.cc index df92503..872b1d6 100644 --- a/gcc/analyzer/region-model-manager.cc +++ b/gcc/analyzer/region-model-manager.cc @@ -49,7 +49,7 @@ region_model_manager::region_model_manager (logger *logger) m_root_region (alloc_symbol_id ()), m_stack_region (alloc_symbol_id (), &m_root_region), m_heap_region (alloc_symbol_id (), &m_root_region), - m_unknown_NULL (NULL), + m_unknown_NULL (nullptr), m_checking_feasibility (false), m_max_complexity (0, 0), m_code_region (alloc_symbol_id (), &m_root_region), @@ -259,7 +259,7 @@ region_model_manager::get_or_create_null_ptr (tree pointer_type) return get_or_create_int_cst (pointer_type, 0); } -/* Return the svalue * for a unknown_svalue for TYPE (which can be NULL), +/* Return the svalue * for a unknown_svalue for TYPE (which can be NULL_TREE), creating it if necessary. The unknown_svalue instances are reused, based on pointer equality of the types */ @@ -407,7 +407,7 @@ region_model_manager::get_ptr_svalue (tree ptr_type, const region *pointee) /* Subroutine of region_model_manager::get_or_create_unaryop. Attempt to fold the inputs and return a simpler svalue *. - Otherwise, return NULL. */ + Otherwise, return nullptr. */ const svalue * region_model_manager::maybe_fold_unaryop (tree type, enum tree_code op, @@ -516,7 +516,7 @@ region_model_manager::maybe_fold_unaryop (tree type, enum tree_code op, } } - return NULL; + return nullptr; } /* Return the svalue * for an unary operation OP on ARG with a result of @@ -594,7 +594,7 @@ region_model_manager::get_or_create_cast (tree type, const svalue *arg) If COMPOUND_SVAL has a value for the appropriate bits, return it, shifted accordingly. - Otherwise return NULL. */ + Otherwise return nullptr. */ const svalue * region_model_manager:: @@ -606,7 +606,7 @@ maybe_undo_optimize_bit_field_compare (tree type, if (!type) return nullptr; if (!INTEGRAL_TYPE_P (type)) - return NULL; + return nullptr; const binding_map &map = compound_sval->get_map (); unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (cst); @@ -614,7 +614,7 @@ maybe_undo_optimize_bit_field_compare (tree type, compound_sval has a value for those bits. */ bit_range bits (0, 0); if (!bit_range::from_mask (mask, &bits)) - return NULL; + return nullptr; bit_range bound_bits (bits); if (BYTES_BIG_ENDIAN) @@ -624,7 +624,7 @@ maybe_undo_optimize_bit_field_compare (tree type, = get_store_manager ()->get_concrete_binding (bound_bits); const svalue *sval = map.get (conc); if (!sval) - return NULL; + return nullptr; /* We have a value; shift it by the correct number of bits. */ @@ -641,7 +641,7 @@ maybe_undo_optimize_bit_field_compare (tree type, /* Subroutine of region_model_manager::get_or_create_binop. Attempt to fold the inputs and return a simpler svalue *. - Otherwise, return NULL. */ + Otherwise, return nullptr. */ const svalue * region_model_manager::maybe_fold_binop (tree type, enum tree_code op, @@ -669,7 +669,7 @@ region_model_manager::maybe_fold_binop (tree type, enum tree_code op, if ((type && FLOAT_TYPE_P (type)) || (arg0->get_type () && FLOAT_TYPE_P (arg0->get_type ())) || (arg1->get_type () && FLOAT_TYPE_P (arg1->get_type ()))) - return NULL; + return nullptr; switch (op) { @@ -898,7 +898,7 @@ region_model_manager::maybe_fold_binop (tree type, enum tree_code op, /* etc. */ - return NULL; + return nullptr; } /* Return the svalue * for an binary operation OP on ARG0 and ARG1 @@ -933,7 +933,7 @@ region_model_manager::get_or_create_binop (tree type, enum tree_code op, } /* Subroutine of region_model_manager::get_or_create_sub_svalue. - Return a folded svalue, or NULL. */ + Return a folded svalue, or nullptr. */ const svalue * region_model_manager::maybe_fold_sub_svalue (tree type, @@ -1020,7 +1020,7 @@ region_model_manager::maybe_fold_sub_svalue (tree type, if (type) return get_or_create_cast (type, repeated_sval->get_inner_svalue ()); - return NULL; + return nullptr; } /* Return the svalue * for extracting a subvalue of type TYPE from @@ -1046,7 +1046,7 @@ region_model_manager::get_or_create_sub_svalue (tree type, } /* Subroutine of region_model_manager::get_or_create_repeated_svalue. - Return a folded svalue, or NULL. */ + Return a folded svalue, or nullptr. */ const svalue * region_model_manager::maybe_fold_repeated_svalue (tree type, @@ -1080,7 +1080,7 @@ region_model_manager::maybe_fold_repeated_svalue (tree type, if (zerop (cst) && type) return get_or_create_cast (type, inner_svalue); - return NULL; + return nullptr; } /* Return the svalue * of type TYPE in which INNER_SVALUE is repeated @@ -1274,7 +1274,7 @@ region_model_manager::maybe_fold_bits_within_svalue (tree type, } break; } - return NULL; + return nullptr; } /* Return the svalue * of type TYPE for extracting BITS from INNER_SVALUE, @@ -1401,7 +1401,7 @@ region_model_manager::get_or_create_conjured_svalue (tree type, } /* Subroutine of region_model_manager::get_or_create_asm_output_svalue. - Return a folded svalue, or NULL. */ + Return a folded svalue, or nullptr. */ const svalue * region_model_manager:: @@ -1413,7 +1413,7 @@ maybe_fold_asm_output_svalue (tree type, if (iter->get_kind () == SK_UNKNOWN) return get_or_create_unknown_svalue (type); - return NULL; + return nullptr; } /* Return the svalue * of type TYPE for OUTPUT_IDX of the deterministic @@ -1501,7 +1501,7 @@ get_or_create_const_fn_result_svalue (tree type, /* Given DATA_CST (a STRING_CST or RAW_DATA_CST) and BYTE_OFFSET_CST a constant, attempt to get the character at that offset, returning either - the svalue for the character constant, or NULL if unsuccessful. */ + the svalue for the character constant, or nullptr if unsuccessful. */ const svalue * region_model_manager::maybe_get_char_from_cst (tree data_cst, @@ -1533,7 +1533,7 @@ get_string_cst_size (const_tree string_cst) /* Given STRING_CST, a STRING_CST and BYTE_OFFSET_CST a constant, attempt to get the character at that offset, returning either - the svalue for the character constant, or NULL if unsuccessful. */ + the svalue for the character constant, or nullptr if unsuccessful. */ const svalue * region_model_manager::maybe_get_char_from_string_cst (tree string_cst, @@ -1552,7 +1552,7 @@ region_model_manager::maybe_get_char_from_string_cst (tree string_cst, if (compare_constants (byte_offset_cst, GE_EXPR, get_string_cst_size (string_cst)).is_true ()) - return NULL; + return nullptr; int char_val; if (compare_tree_int (byte_offset_cst, @@ -1567,12 +1567,12 @@ region_model_manager::maybe_get_char_from_string_cst (tree string_cst, = build_int_cst_type (TREE_TYPE (TREE_TYPE (string_cst)), char_val); return get_or_create_constant_svalue (char_cst); } - return NULL; + return nullptr; } /* Given RAW_DATA_CST, a RAW_DATA_CST and BYTE_OFFSET_CST a constant, attempt to get the character at that offset, returning either - the svalue for the character constant, or NULL if unsuccessful. */ + the svalue for the character constant, or nullptr if unsuccessful. */ const svalue * region_model_manager::maybe_get_char_from_raw_data_cst (tree raw_data_cst, @@ -1801,7 +1801,7 @@ region_model_manager::get_cast_region (const region *original_region, } /* Return the frame_region for call to FUN from CALLING_FRAME, creating it - if necessary. CALLING_FRAME may be NULL. */ + if necessary. CALLING_FRAME may be nullptr. */ const frame_region * region_model_manager::get_frame_region (const frame_region *calling_frame, |