CompileFlags:
    CompilationDatabase: build
    Add:
        - -Werror -Wall -Wextra -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion
        - -Wundefined-inline
Diagnostics:
    Suppress:
        - misc-unused-alias-decls
        - misc-unused-using-decls
        - misc-definitions-in-headers # TODO fix and remove these violations
---
If:
    PathMatch:
        - include/.*
        - src/.*
    PathExclude:
        - include/simdjson.h
        - src/simdjson.cpp
CompileFlags:
    Add:
        - -Wno-unneeded-internal-declaration
        - -Wno-undefined-internal # TODO fix and remove these violations
        - -Wno-unused-function
        - -Wno-unused-const-variable
Diagnostics:
    Suppress:
        - pp_including_mainfile_in_preamble
---
# Amalgamated files that require or partly define an implementation
If:
    PathMatch:
        - .*/(arm64|fallback|haswell|icelake|ppc64|westmere)/begin.h
        - .*/generic/.*
Diagnostics:
    Suppress:
        - pragma_attribute_no_pop_eof
---
# clang has a bad time detecting the push/pop together in src/ for some reason
If:
    PathMatch:
        - include/simdjson/.*/end.h
        - src/(arm64|fallback|haswell|icelake|ppc64|westmere).cpp
Diagnostics:
    Suppress:
        - pragma_attribute_no_pop_eof
        - pragma_attribute_stack_mismatch
