]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixes for running with a non system version of clangd on macos
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 8 Dec 2022 20:10:58 +0000 (14:10 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 8 Dec 2022 20:10:58 +0000 (14:10 -0600)
.clangd

diff --git a/.clangd b/.clangd
index 6c810b746dd773155aa02af474fba8e00ffcd402..b11249f9f40134b178aa0229045c188866b6b47f 100644 (file)
--- a/.clangd
+++ b/.clangd
@@ -1,6 +1,16 @@
 # Should apply only to header files
 If:
   PathMatch: .*\.h
+CompileFlags:
+  # macos: non-system clangd doesn't seem to include /usr/local/include in the default path
+  Add: [
+      "-I/usr/local/include"
+  ]
+  # macos: flags that come from xcrun that brewd clangd doesn't understand
+  Remove: [
+      "-clang-vendor-feature*",
+      "-fno-odr-hash-protocols"
+  ]
 Diagnostics:
   Suppress: [
       # Clangd doesn't register that functions or macros are used in source files which
@@ -10,6 +20,16 @@ Diagnostics:
   ]
 ---
 # Applies to all files
+CompileFlags:
+  # macos: non-system clangd doesn't seem to include /usr/local/include in the default path
+  Add: [
+      "-I/usr/local/include"
+  ]
+  # macos: flags that come from xcrun that brewd clangd doesn't understand
+  Remove: [
+      "-clang-vendor-feature*",
+      "-fno-odr-hash-protocols*"
+  ]
 Diagnostics:
   ClangTidy:
     Remove: [