Skip to content

Commit 43c04ab

Browse files
authored
Merge pull request #6367 from diffblue/crangler
Crangler
2 parents 720f7c8 + 9412ce5 commit 43c04ab

35 files changed

+1986
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
150150
"$<TARGET_FILE:unit>"
151151
"$<TARGET_FILE:goto-harness>"
152152
"$<TARGET_FILE:cbmc>"
153+
"$<TARGET_FILE:crangler>"
153154
"$<TARGET_FILE:driver>"
154155
"$<TARGET_FILE:goto-analyzer>"
155156
"$<TARGET_FILE:goto-cc>"
@@ -213,6 +214,8 @@ cprover_default_properties(
213214
cbmc
214215
cbmc-lib
215216
cpp
217+
crangler
218+
crangler-lib
216219
driver
217220
goto-analyzer
218221
goto-analyzer-lib

regression/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ if(WITH_MEMORY_ANALYZER)
8383
add_subdirectory(memory-analyzer)
8484
add_subdirectory(extract_type_header)
8585
endif()
86+
87+
if(NOT WIN32)
88+
add_subdirectory(crangler)
89+
endif()

regression/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# listed with decreasing runtimes (i.e. longest running at the top)
44
DIRS = cbmc \
55
cbmc-library \
6+
crangler \
67
goto-analyzer \
78
ansi-c \
89
goto-instrument \

regression/crangler/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:crangler>"
3+
)

regression/crangler/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
default: tests.log
2+
3+
include ../../src/config.inc
4+
include ../../src/common
5+
6+
ifeq ($(BUILD_ENV_),MSVC)
7+
test:
8+
9+
tests.log:
10+
11+
else
12+
test:
13+
@../test.pl -e -p -c '../../../src/crangler/crangler'
14+
15+
tests.log:
16+
@../test.pl -e -p -c '../../../src/crangler/crangler'
17+
endif
18+
19+
clean:
20+
@for dir in *; do \
21+
$(RM) tests.log; \
22+
if [ -d "$$dir" ]; then \
23+
cd "$$dir"; \
24+
$(RM) *.out *.gb; \
25+
cd ..; \
26+
fi \
27+
done
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
int foo()
2+
{
3+
return 0;
4+
}
5+
6+
int bar();
7+
8+
static void foobar1()
9+
{
10+
}
11+
12+
void static foobar2()
13+
{
14+
}
15+
16+
static short x;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
remove_static1.json
3+
4+
^\s+void foobar1\(\)$
5+
^\s+short x;$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"sources": [
3+
"remove_static1.c"
4+
],
5+
"functions": [
6+
{
7+
"foobar1": [
8+
"remove static"
9+
]
10+
}
11+
],
12+
"objects": [
13+
{
14+
"x": [
15+
"remove static"
16+
]
17+
}
18+
],
19+
"output": "stdout"
20+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
int foo()
2+
{
3+
return 0;
4+
}
5+
6+
int bar();
7+
8+
static void foobar1()
9+
{
10+
}
11+
12+
void static foobar2()
13+
{
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
remove_static1.json
3+
4+
^\s+void foobar1\(\)$
5+
^void\s+foobar2\(\)$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--

0 commit comments

Comments
 (0)