Skip to content

Commit dec5e18

Browse files
authored
Setup autocomplete with clangd (#136)
1 parent 2bd51e5 commit dec5e18

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

bench.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
#include <time.h>
1111

1212
#define BUDDY_ALLOC_ALIGN 64
13+
#ifndef BUDDY_ALLOC_IMPLEMENTATION
1314
#define BUDDY_ALLOC_IMPLEMENTATION
15+
#endif
1416
#include "buddy_alloc.h"
1517
#undef BUDDY_ALLOC_IMPLEMENTATION
1618

compile_flags.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-DBUDDY_ALLOC_IMPLEMENTATION
2+
-DBUDDY_EXPERIMENTAL_CHANGE_TRACKING

test-fuzz.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include <assert.h>
22
#include <stdlib.h>
3+
4+
#ifndef BUDDY_ALLOC_IMPLEMENTATION
35
#define BUDDY_ALLOC_IMPLEMENTATION
6+
#endif
47
#include "buddy_alloc.h"
58

69
int main(void)

testcxx.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
*/
44

55
// Just include buddy_alloc from C++
6+
#ifndef BUDDY_ALLOC_IMPLEMENTATION
67
#define BUDDY_ALLOC_IMPLEMENTATION
8+
#endif
79
#include "buddy_alloc.h"
810
#undef BUDDY_ALLOC_IMPLEMENTATION
911

tests.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
#define _POSIX_C_SOURCE 200112L
88

99
#include <assert.h>
10-
#include <errno.h>
1110
#include <stdio.h>
1211
#include <stdlib.h>
1312
#include <string.h>
1413

14+
#ifndef BUDDY_EXPERIMENTAL_CHANGE_TRACKING
1515
#define BUDDY_EXPERIMENTAL_CHANGE_TRACKING
16+
#endif
1617

18+
#ifndef BUDDY_ALLOC_IMPLEMENTATION
1719
#define BUDDY_ALLOC_IMPLEMENTATION
20+
#endif
1821
#include "buddy_alloc.h"
1922
#undef BUDDY_ALLOC_IMPLEMENTATION
2023

0 commit comments

Comments
 (0)