diff options
Diffstat (limited to 'gcc/analyzer/program-point.cc')
-rw-r--r-- | gcc/analyzer/program-point.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/analyzer/program-point.cc b/gcc/analyzer/program-point.cc index c95f863..1f82559 100644 --- a/gcc/analyzer/program-point.cc +++ b/gcc/analyzer/program-point.cc @@ -171,7 +171,7 @@ function_point::get_function () const if (m_supernode) return m_supernode->m_fun; else - return NULL; + return nullptr; } /* Get the gimple stmt for this function_point, if any. */ @@ -184,7 +184,7 @@ function_point::get_stmt () const else if (m_kind == PK_AFTER_SUPERNODE) return m_supernode->get_last_stmt (); else - return NULL; + return nullptr; } /* Get a location for this function_point, if any. */ @@ -219,18 +219,18 @@ function_point::final_stmt_p () const function_point function_point::from_function_entry (const supergraph &sg, const function &fun) { - return before_supernode (sg.get_node_for_function_entry (fun), NULL); + return before_supernode (sg.get_node_for_function_entry (fun), nullptr); } /* Create a function_point representing entering supernode SUPERNODE, - having reached it via FROM_EDGE (which could be NULL). */ + having reached it via FROM_EDGE (which could be nullptr). */ function_point function_point::before_supernode (const supernode *supernode, const superedge *from_edge) { if (from_edge && from_edge->get_kind () != SUPEREDGE_CFG_EDGE) - from_edge = NULL; + from_edge = nullptr; return function_point (supernode, from_edge, 0, PK_BEFORE_SUPERNODE); } @@ -673,7 +673,7 @@ function_point::get_next () const program_point program_point::origin (const region_model_manager &mgr) { - return program_point (function_point (NULL, NULL, + return program_point (function_point (nullptr, nullptr, 0, PK_ORIGIN), mgr.get_empty_call_string ()); } @@ -766,11 +766,11 @@ namespace selftest { static void test_function_point_equality () { - const supernode *snode = NULL; + const supernode *snode = nullptr; - function_point a = function_point (snode, NULL, 0, + function_point a = function_point (snode, nullptr, 0, PK_BEFORE_SUPERNODE); - function_point b = function_point::before_supernode (snode, NULL); + function_point b = function_point::before_supernode (snode, nullptr); ASSERT_EQ (a, b); } @@ -779,12 +779,12 @@ test_function_point_equality () static void test_function_point_ordering () { - const supernode *snode = NULL; + const supernode *snode = nullptr; /* Populate an array with various points within the same snode, in order. */ auto_vec<function_point> points; - points.safe_push (function_point::before_supernode (snode, NULL)); + points.safe_push (function_point::before_supernode (snode, nullptr)); points.safe_push (function_point::before_stmt (snode, 0)); points.safe_push (function_point::before_stmt (snode, 1)); points.safe_push (function_point::after_supernode (snode)); @@ -816,14 +816,14 @@ test_program_point_equality () { region_model_manager mgr; - const supernode *snode = NULL; + const supernode *snode = nullptr; const call_string &cs = mgr.get_empty_call_string (); - program_point a = program_point::before_supernode (snode, NULL, + program_point a = program_point::before_supernode (snode, nullptr, cs); - program_point b = program_point::before_supernode (snode, NULL, + program_point b = program_point::before_supernode (snode, nullptr, cs); ASSERT_EQ (a, b); |