Skip to content

Commit e9205e6

Browse files
smowtonpeterschrammel
authored andcommitted
Style namespace-utils
1 parent a69d950 commit e9205e6

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/util/namespace_utils.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
/*******************************************************************\
2+
3+
Module:
4+
5+
Author: Daniel Kroening, [email protected]
6+
7+
\*******************************************************************/
8+
19
#include "namespace_utils.h"
210
#include "symbol.h"
311
#include <goto-programs/remove_returns.h>
412

5-
613
/*******************************************************************\
14+
715
Function: namespace_utils_baset::does_symbol_match
816
917
Purpose:
@@ -19,6 +27,7 @@
1927
Whether the exprt was actually a symbolt matching a predicate
2028
2129
\*******************************************************************/
30+
2231
bool namespace_utils_baset::does_symbol_match(
2332
const exprt &lvalue,
2433
std::function<bool(symbolt)> predicate) const
@@ -32,6 +41,7 @@ bool namespace_utils_baset::does_symbol_match(
3241
}
3342

3443
/*******************************************************************\
44+
3545
Function: namespace_utils_baset::is_parameter
3646
3747
Purpose:
@@ -45,6 +55,7 @@ bool namespace_utils_baset::does_symbol_match(
4555
Whether the exprt was actually a parameter symbol
4656
4757
\*******************************************************************/
58+
4859
bool namespace_utils_baset::is_parameter(const exprt &lvalue) const
4960
{
5061
return does_symbol_match(
@@ -53,6 +64,7 @@ bool namespace_utils_baset::is_parameter(const exprt &lvalue) const
5364
}
5465

5566
/*******************************************************************\
67+
5668
Function: namespace_utils_baset::is_static
5769
5870
Purpose:
@@ -66,6 +78,7 @@ bool namespace_utils_baset::is_parameter(const exprt &lvalue) const
6678
Whether the exprt was actually a static symbol
6779
6880
\*******************************************************************/
81+
6982
bool namespace_utils_baset::is_static(const exprt &lvalue) const
7083
{
7184
// TODO: Also check for static member accesses
@@ -75,6 +88,7 @@ bool namespace_utils_baset::is_static(const exprt &lvalue) const
7588
}
7689

7790
/*******************************************************************\
91+
7892
Function: namespace_utils_baset::is_auxiliary_variable
7993
8094
Purpose:
@@ -88,6 +102,7 @@ bool namespace_utils_baset::is_static(const exprt &lvalue) const
88102
Whether the exprt was actually an auxiliary variable symbol
89103
90104
\*******************************************************************/
105+
91106
bool namespace_utils_baset::is_auxiliary_variable(const exprt &lvalue) const
92107
{
93108
return does_symbol_match(
@@ -96,6 +111,7 @@ bool namespace_utils_baset::is_auxiliary_variable(const exprt &lvalue) const
96111
}
97112

98113
/*******************************************************************\
114+
99115
Function: namespace_utils_baset::is_return_value_auxiliary
100116
101117
Purpose:
@@ -109,6 +125,7 @@ bool namespace_utils_baset::is_auxiliary_variable(const exprt &lvalue) const
109125
Whether the exprt was actually an auxiliary return value symbol
110126
111127
\*******************************************************************/
128+
112129
bool namespace_utils_baset::is_return_value_auxiliary(const exprt &lvalue) const
113130
{
114131
return

src/util/namespace_utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
// THIS FILE IS DEPRECATED
9+
#ifndef CPROVER_UTIL_NAMESPACE_UTILS_H
10+
#define CPROVER_UTIL_NAMESPACE_UTILS_H
1011

11-
#ifndef CPROVER_NAMESPACE_UTILS_H
12-
#define CPROVER_NAMESPACE_UTILS_H
12+
// THIS FILE IS DEPRECATED
1313

1414
#include <functional>
1515
#include "namespace.h"
@@ -103,7 +103,7 @@ class namespace_utils_baset
103103
class namespace_utilst:public virtual namespace_utils_baset
104104
{
105105
public:
106-
namespace_utilst(const namespacet &_ns):__ns(_ns){}
106+
explicit namespace_utilst(const namespacet &_ns):__ns(_ns) {}
107107

108108
protected:
109109
const namespacet &__ns;

0 commit comments

Comments
 (0)