((nil . ((eval . (set (make-local-variable 'project-root-dir) (replace-regexp-in-string "~" (getenv "HOME") (locate-dominating-file default-directory ".dir-locals.el")))))) ;; TODO: Disable hicpp-no-array-decay/cppcoreguidelines-pro-bounds-array-to-pointer-decay once c++20. (c++-mode . ((c-basic-offset . 4) (eval . (set 'lsp-clients-clangd-args (list "-j=4" "-background-index" "--clang-tidy" (format "--compile-commands-dir=%s" project-root-dir) "--clang-tidy-checks=*,-llvmlibc-callee-namespace,-fuchsia-default-arguments-calls,-fuchsia-default-arguments-declarations,-llvmlibc-restrict-system-libc-headers,-cppcoreguidelines-pro-type-vararg,-hicpp-vararg,-hicpp-no-array-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-google-runtime-int,-google-readability-todo" "--limit-results=0"))))) )