Skip to content

Commit 7eceeb5

Browse files
authored
Merge pull request #6426 from adpaco-aws/debug-convert-function
Include function and parameter in `convert_function` error messages
2 parents fe79da1 + 21680ba commit 7eceeb5

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

COMPILING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#WHAT ARCHITECTURE ?
1+
# What architecture?
22

33
CPROVER now needs a C++11 compliant compiler and is known to work in the
44
following environments:
@@ -18,7 +18,7 @@ past, but are not actively tested:
1818
- Solaris 11
1919
- FreeBSD 11
2020

21-
#Building using CMake
21+
# Building using CMake
2222

2323
Building with CMake is supported across Linux, MacOS X and Windows with Visual
2424
Studio 2019. There are also hand-written make files which can be used to build

src/goto-programs/goto_convert_functions.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,19 @@ void goto_convert_functionst::convert_function(
166166
// we have a body, make sure all parameter names are valid
167167
for(const auto &p : f.parameter_identifiers)
168168
{
169-
DATA_INVARIANT(!p.empty(), "parameter identifier should not be empty");
170-
DATA_INVARIANT(
169+
DATA_INVARIANT_WITH_DIAGNOSTICS(
170+
!p.empty(),
171+
"parameter identifier should not be empty",
172+
"function:",
173+
identifier);
174+
175+
DATA_INVARIANT_WITH_DIAGNOSTICS(
171176
symbol_table.has_symbol(p),
172-
"parameter identifier must be a known symbol");
177+
"parameter identifier must be a known symbol",
178+
"function:",
179+
identifier,
180+
"parameter:",
181+
p);
173182
}
174183

175184
lifetimet parent_lifetime = lifetime;

0 commit comments

Comments
 (0)