-
Notifications
You must be signed in to change notification settings - Fork 96
How to prevent false-positive errors propagating from 3rd party libarires/modm/arm-none-eabi-gcc #2641
Replies: 2 comments · 4 replies
|
I would not recommend trying to suppress error diagnostics, but rather addressing their underlying cause, which is usually a configuration issue. It's hard to say what the configuration issue is based on the information provided. Looking at clangd logs would be a first step to diagnose (e.g. verify that the query-driver mechanism is working correctly). Feel free to attach clangd logs here for help analyzing them. |
All reactions
-
👍 1
|
All reactions
|
@HighCommander4 Here's a log file after I erased the .clang cache |
All reactions
|
Ok, the log shows that the The next step would be to check your compile command. Assuming you have a version of clang-21 --driver-mode=g++ -c -fno-exceptions -fno-rtti -fno-unwind-tables -fstrict-enums -fuse-cxa-atexit -std=c++20 -Wno-volatile -Woverloaded-virtual -fdata-sections -ffile-prefix-map=/home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10=. -ffile-prefix-map=/home/rave/Documents/git/fang-robotics-mcb/fang-mcb-project/taproot=. -ffunction-sections -finline-limit=10000 -fshort-wchar -fsingle-precision-constant -funsigned-bitfields -funsigned-char -fwrapv -g3 -gdwarf-3 -W -Wall -Wdouble-promotion -Wduplicated-cond -Werror=format -Werror=maybe-uninitialized -Werror=overflow -Werror=sign-compare -Wextra -Wlogical-op -Wno-redundant-decls -Wpointer-arith -Wundef -Og -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -fno-inline -Wno-misleading-indentation "-D TARGET_SLICE" -DARM_MATH_CM4 -DSTM32F4 -DMODM_DEBUG_BUILD -I. -Isrc -Irobot-type -Ilib/units/include -Ilib/RAIL-Robomaster-Abstraction-Interface-Library/include -Ilib/cool-serial/include -Ilib/flatbuffers/include -Ilib/echo/include -Itaproot/modm/ext -Itaproot/modm/ext/cmsis/core -Itaproot/modm/ext/cmsis/device -Itaproot/modm/ext/cmsis/dsp -Itaproot/modm/src -Itaproot/src -Itaproot/ext -o build/hardware/scons-debug/src/main.o -isystem /home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/include/c++/10.3.1 -isystem /home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/include/c++/10.3.1/arm-none-eabi -isystem /home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/include/c++/10.3.1/backward -isystem /home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/include-fixed -isystem /home/rave/.local/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/include --target=arm-none-eabi -resource-dir=/usr/bin/../lib/clang/21 -- /home/rave/Documents/git/fang-robotics-mcb/fang-mcb-project/src/main.cppin a terminal, in the directory (I got this command by looking in the logs for "ASTWorker building file with command ... ", taking the command that's printed on the next line, and replacing the compiler name with Does this succeed, or do you get the same error diagnostics on the terminal? |
All reactions
-
👍 1
|
Lemme check. I was suppressing the odd errors seeing that it was a divergence between clangd and arm-none-eabi-gcc 10.3 (we have to use that specific version or else the code will not compile). The firmware developers told us that they're currently locked into that specific version, too. |

Uh oh!
There was an error while loading. Please reload this page.
The project I'm working with uses scons, so I won't be able to mark headers as system includes. I am using arm-none-eabi-gcc, with query-drivers configured.
The code compiles well and plays nicely with intellisense. I'm trying to migrate away from Intellisense because skrew Microsoft for spiting vscodium and github slopification lol
I have tried:
Disabling diagnostics for paths that match 3rd party libraries - diagnostics are disabled if the files are the active one but not if they're included somewhereelse.
Disabling include diagnostics - only checks for unused includes, continues to propagaet
Finding an error/warning class for "in included file: " to disable - but I could not find anything.
I don't want to disable those diagnostics because that means that
current clangd with some of the stuff I tried
(compile flags did solve the false-positives or the conflicts with arm-none-eabi-gcc)
coc-settings.json
Thank you for your time and thank you for your help, fellow internet strangers ^_^
All reactions