# clangd user configuration. # # Cross-compiled embedded builds (Zephyr in particular) put GCC-only flags into # compile_commands.json. clangd is clang, does not recognise them, and reports # "Unknown argument: ..." on line 1 of every file in the project -- even though # the code itself is fine and all symbols resolve. # # Stripping them here, once, fixes every such project without needing a .clangd # file checked into each one. Remove only drops a flag if it is actually # present, so this is inert for native builds. # # If a new one shows up for another target (RISC-V, Xtensa ...), the message # names it exactly -- add it to the list below. CompileFlags: Remove: # --- seen in Zephyr / arm-none-eabi builds --- - -fno-printf-return-value - -fno-reorder-functions - -fno-defer-pop - -fconserve-stack - -fno-freestanding - -mfp16-format=* - -mno-fdpic # GCC tuning params clang has no equivalent for - --param=*