File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ endif ()
25
25
26
26
set (library_dir "${CMAKE_SOURCE_DIR} /../o1heap" )
27
27
28
- # Use -DNO_STATIC_ANALYSIS=1 to suppress static analysis.
29
- # If not suppressed, the tools used here shall be available, otherwise the build will fail.
30
- if (NOT NO_STATIC_ANALYSIS )
28
+ # clang-tidy
29
+ set (DISABLE_CLANG_TIDY OFF CACHE BOOL "Do not use Clang-Tidy" )
30
+ if (NOT DISABLE_CLANG_TIDY )
31
31
# clang-tidy (separate config files per directory)
32
32
find_program (clang_tidy NAMES clang-tidy)
33
33
if (NOT clang_tidy)
@@ -99,3 +99,4 @@ gen_test_matrix(
99
99
test_general.cpp
100
100
""
101
101
)
102
+ gen_test("test_general_c11_x32_trc" "test_general.cpp" "O1HEAP_TRACE=1" c_std_11 "-m32" "-m32" )
Original file line number Diff line number Diff line change @@ -603,3 +603,21 @@ TEST_CASE("General: invariant checker")
603
603
dg.oom_count ++;
604
604
REQUIRE (heap->doInvariantsHold ());
605
605
}
606
+
607
+ extern " C" void o1heapTraceAllocate (O1HeapInstance* const handle, void * const allocated_memory, size_t size)
608
+ {
609
+ REQUIRE (handle != nullptr );
610
+ const auto * const h = reinterpret_cast <internal::O1HeapInstance*>(handle);
611
+ h->validate ();
612
+ (void ) allocated_memory;
613
+ (void ) size;
614
+ }
615
+
616
+ extern " C" void o1heapTraceFree (O1HeapInstance* const handle, void * const freed_memory, size_t size)
617
+ {
618
+ REQUIRE (handle != nullptr );
619
+ const auto * const h = reinterpret_cast <internal::O1HeapInstance*>(handle);
620
+ h->validate ();
621
+ (void ) freed_memory;
622
+ (void ) size;
623
+ }
You can’t perform that action at this time.
0 commit comments