# clangd settings for zash. `make compdb` writes compile_commands.json; this # file adds what that database cannot say. CompileFlags: # The build uses these (see CSTD and CPPFLAGS in the Makefile), so the # editor sees the same language level and feature macros. Add: [-std=c23, -D_XOPEN_SOURCE=700, -Wall, -Wextra, -Wshadow, -Wstrict-prototypes, -Wmissing-prototypes, -Wconversion, -Wno-sign-conversion] # IBM Open XL and the z/OS-only file are not built on Linux. Remove: [-fzos-le-char-mode=*, -m64] CompilationDatabase: . # src/sys_zos.c is never built on Linux, but it can still be checked: point # clangd at a z/OS sysroot (/usr/include copied off a z/OS host) with the # editor's own clangd config, e.g. # If: {PathMatch: .*/src/sys_zos\.c} # CompileFlags: # Add: [-m32, -D__LL, -D__builtin_zos_va_list=__builtin_va_list, # -D_ALL_SOURCE, -D_EXT, -D_OPEN_SYS_FILE_EXT=1, # -isystem, /path/to/sysroots/zos/usr/include] # The path is per machine, so it does not belong in this file. --- # Tests and benchmarks are shell scripts, not C. If: PathMatch: (tests|bench)/.* Diagnostics: Suppress: ['*'] --- Diagnostics: UnusedIncludes: Strict MissingIncludes: Strict ClangTidy: # Use .clang-tidy; do not duplicate its checks here. FastCheckFilter: Strict # Two checks .clang-tidy already switches off or allows. clangd applies # its CheckOptions unevenly between clang-tidy versions, so name them # here too. The tree writes `if (ptr)` and spells C11 keywords such as # _Static_assert, which are the implementation's namespace to define. Remove: - readability-implicit-bool-conversion - bugprone-reserved-identifier Index: Background: Build InlayHints: Enabled: false Hover: ShowAKA: true Completion: AllScopes: false Style: FullyQualifiedNamespaces: []