From: João Távora Date: Sun, 11 May 2025 10:14:02 +0000 (+0100) Subject: Tweak .clangd to work with gcc-compiled Emacs (bug#78367) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75d5db4b554061e348bd65d617da8b2d6b2c62eb;p=emacs.git Tweak .clangd to work with gcc-compiled Emacs (bug#78367) A Gcc configuration of Emacs emits -fstrict-flex-arrays but clangd doesn't understand that. This causes spurious errors of "unknown flag" that prevent analysis. So tweak .clangd to the nearest clang equivalent (which is very similar). * .clangd (CompileFlags): Remove -fstrict-flex-arrays, add -fstrict-flex-arrays=3. (cherry picked from commit 9df2074a06fefa0b5bfe9714b45c383fa45d6650) --- diff --git a/.clangd b/.clangd index 469d33dfd03..5c7308d64ae 100644 --- a/.clangd +++ b/.clangd @@ -2,4 +2,5 @@ If: PathMatch: "src/*.c" CompileFlags: - Add: [-Wno-unused-macros, -include=config.h] + Add: [-Wno-unused-macros, -include=config.h, -fstrict-flex-arrays=3] + Remove: [-fstrict-flex-arrays]