Skip to content

Commit 232df3e

Browse files
author
Remi Delmas
committed
clang-format and cpplint fixes
1 parent 1a828e1 commit 232df3e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

regression/cbmc/pragma_cprover_enable_disable_multiple/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ int main()
77

88
#pragma CPROVER check push
99
#pragma CPROVER check enable "pointer-overflow"
10-
#pragma CPROVER check enable "pointer-overflow" // should not print an error message
10+
// should not print an error message
11+
#pragma CPROVER check enable "pointer-overflow"
1112
#pragma CPROVER check push
1213
#pragma CPROVER check disable "pointer-primitive"
13-
#pragma CPROVER check enable "pointer-primitive" // should print an error message
14+
// PARSE_ERROR
15+
#pragma CPROVER check enable "pointer-primitive"
1416
#pragma CPROVER check pop
1517
#pragma CPROVER check pop
1618
return 0;

src/analyses/goto_check.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Author: Daniel Kroening, [email protected]
2525
#include <util/ieee_float.h>
2626
#include <util/invariant.h>
2727
#include <util/make_unique.h>
28-
#include <util/options.h>
2928
#include <util/message.h>
29+
#include <util/options.h>
3030
#include <util/pointer_expr.h>
3131
#include <util/pointer_offset_size.h>
3232
#include <util/pointer_predicates.h>
@@ -1856,7 +1856,7 @@ optionalt<exprt> goto_checkt::rw_ok_check(exprt expr)
18561856
class flag_resett
18571857
{
18581858
public:
1859-
/// \brief Store the current value of \p flag and
1859+
/// \brief Store the current value of \p flag and
18601860
/// then set its value to \p new_value.
18611861
/// \returns true if the flag was already seen before
18621862
bool set_flag(bool &flag, bool new_value)
@@ -1877,7 +1877,7 @@ class flag_resett
18771877
return seen_flags.find(&flag) != seen_flags.end();
18781878
}
18791879

1880-
/// \brief Restore the values of all flags that have been
1880+
/// \brief Restore the values of all flags that have been
18811881
/// modified via `set_flag`.
18821882
~flag_resett()
18831883
{

src/ansi-c/ansi_c_parser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ class ansi_c_parsert : public parsert
123123

124124
void copy_item(const ansi_c_declarationt &declaration)
125125
{
126-
assert(declaration.id() == ID_declaration);
126+
INVARIANT(
127+
declaration.id() == ID_declaration,
128+
"Expected `ID_declaration`, got `" + declaration.id() + "`");
127129
parse_tree.items.push_back(declaration);
128130
}
129131

0 commit comments

Comments
 (0)