summaryrefslogtreecommitdiff
path: root/.clangd
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2025-05-11 11:14:02 +0100
committerJoão Távora <joaotavora@gmail.com>2025-05-11 11:14:32 +0100
commit9df2074a06fefa0b5bfe9714b45c383fa45d6650 (patch)
treeb100d839f439106fd9206328aeb451e489189a7b /.clangd
parentc69c18b732c2b1cd772dc7e15c0ea3074a3492bc (diff)
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.
Diffstat (limited to '.clangd')
-rw-r--r--.clangd3
1 files changed, 2 insertions, 1 deletions
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]