Compare commits
5 Commits
d97cfb97be
...
ea5164e584
Author | SHA1 | Date | |
---|---|---|---|
ea5164e584 | |||
bf3fd83b64 | |||
6f78d26ea1 | |||
1a79bf050e | |||
26cb374c1d |
@ -16,8 +16,10 @@ jobs:
|
|||||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
|
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
|
||||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
||||||
|
|
||||||
|
# determine correct clang version and then install it
|
||||||
apk update
|
apk update
|
||||||
apk add --no-cache llvm19 clang19 clang19-analyzer compiler-rt valgrind
|
RT_VERSION=$(apk search -v compiler-rt | grep -o "compiler-rt-[0-9]*" | head -1 | grep -o "[0-9]*")
|
||||||
|
apk add --no-cache llvm${RT_VERSION} clang${RT_VERSION} clang${RT_VERSION}-analyzer compiler-rt valgrind
|
||||||
|
|
||||||
# Verify versions
|
# Verify versions
|
||||||
echo "---------------------"
|
echo "---------------------"
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,5 @@
|
|||||||
*.o
|
*.o
|
||||||
*.d
|
*.d
|
||||||
/core
|
/core
|
||||||
/oas
|
/build
|
||||||
/oas-asan
|
|
||||||
/oas-msan
|
|
||||||
/reports
|
/reports
|
||||||
|
2
Makefile
2
Makefile
@ -21,7 +21,7 @@ asan:
|
|||||||
msan:
|
msan:
|
||||||
make -rRf make/msan.mk all
|
make -rRf make/msan.mk all
|
||||||
|
|
||||||
validate: asan msan debug
|
validate: asan msan debug release
|
||||||
./validate.sh
|
./validate.sh
|
||||||
|
|
||||||
analyze:
|
analyze:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CFLAGS?=-Wall -Wextra -Wpedantic -O2 -std=c23 -flto -fomit-frame-pointer -DNDEBUG -D_POSIX_C_SOURCE=200809L
|
CFLAGS?=-Wall -Wextra -Wpedantic -Werror -O2 -std=c23 -flto -fomit-frame-pointer -DNDEBUG -D_POSIX_C_SOURCE=200809L
|
||||||
LDFLAGS?=-flto -s -Wl,--gc-sections
|
LDFLAGS?=-flto -s -Wl,--gc-sections
|
||||||
BUILD_DIR?=build/release/
|
BUILD_DIR?=build/release/
|
||||||
|
|
||||||
|
@ -17,10 +17,6 @@ error_t *ast_node_alloc(ast_node_t **output) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ast_node_free_value(ast_node_t *node) {
|
|
||||||
// TODO: decide how value ownership will work and clean it up here
|
|
||||||
}
|
|
||||||
|
|
||||||
void ast_node_free(ast_node_t *node) {
|
void ast_node_free(ast_node_t *node) {
|
||||||
if (node == nullptr)
|
if (node == nullptr)
|
||||||
return;
|
return;
|
||||||
@ -30,8 +26,6 @@ void ast_node_free(ast_node_t *node) {
|
|||||||
free(node->children);
|
free(node->children);
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_node_free_value(node);
|
|
||||||
|
|
||||||
memset(node, 0, sizeof(ast_node_t));
|
memset(node, 0, sizeof(ast_node_t));
|
||||||
free(node);
|
free(node);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ error_t *lexer_open(lexer_t *lex, char *path) {
|
|||||||
*
|
*
|
||||||
* @pre There must be at least n characters in the input buffer
|
* @pre There must be at least n characters in the input buffer
|
||||||
*/
|
*/
|
||||||
void lexer_shift_buffer(lexer_t *lex, int n) {
|
void lexer_shift_buffer(lexer_t *lex, size_t n) {
|
||||||
assert(lex->buffer_count >= n);
|
assert(lex->buffer_count >= n);
|
||||||
lex->buffer_count -= n;
|
lex->buffer_count -= n;
|
||||||
memmove(lex->buffer, lex->buffer + n, lex->buffer_count);
|
memmove(lex->buffer, lex->buffer + n, lex->buffer_count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user