Skip to content

Commit 8ca2615

Browse files
committed
Fix linting issues
1 parent 28d71e4 commit 8ca2615

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/libcprover-rust/include/c_errors.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
// in that we don't want to export internal headers to the clients, and our
1010
// current build system architecture on the C++ end doesn't allow us to do so.
1111
//
12-
// At the same time, we want to allow the Rust API to be able to catch at the shim
13-
// level the errors generated within CBMC, which are C++ types (and subtypes of
14-
// those), and so because of the mechanism that cxx.rs uses, we need to have the
15-
// types present at compilation time (an incomplete type won't do - I've tried).
12+
// At the same time, we want to allow the Rust API to be able to catch at the
13+
// shimlevel the errors generated within CBMC, which are C++ types (and
14+
// subtypes of those), and so because of the mechanism that cxx.rs uses, we
15+
// need to have thetypes present at compilation time (an incomplete type won't
16+
// do - I've tried).
1617
//
1718
// This is the best way that we have currently to be have the type definitions
1819
// around so that the exception handling code knows what our exceptions look
@@ -23,7 +24,7 @@
2324
// This should mirror the definition in `util/invariant.h`.
2425
class invariant_failedt
2526
{
26-
private:
27+
private:
2728
const std::string file;
2829
const std::string function;
2930
const int line;
@@ -56,7 +57,7 @@ class invariant_failedt
5657
// This is needed here because the original definition is in the file
5758
// <util/exception_utils.h> which is including <util/source_location.h>, which
5859
// being an `irep` is a no-go for our needs as we will need to expose internal
59-
// headers as well.
60+
// headers as well.
6061
class cprover_exception_baset
6162
{
6263
public:

src/libcprover-rust/src/c_api.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// NOLINTNEXTLINE(build/include)
44
#include "include/c_api.h"
55

6-
#include <cprover/api.h>
6+
// clang-format off
7+
#include <api.h>
8+
// clang-format on
79

810
#include <algorithm>
911
#include <cassert>
@@ -26,6 +28,7 @@ _translate_vector_of_string(rust::Vec<rust::String> elements)
2628
std::back_inserter(*stdv),
2729
[](rust::String elem) { return std::string(elem); });
2830

31+
// NOLINTNEXTLINE(build/deprecated)
2932
assert(elements.size() == stdv->size());
3033
return *stdv;
3134
}

src/libcprover-rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
pub mod cprover_api {
77

88
unsafe extern "C++" {
9-
include!("cprover/api.h");
9+
include!("api.h");
1010
include!("include/c_api.h");
1111

1212
/// Central organisational handle of the API. This directly corresponds to the

0 commit comments

Comments
 (0)