Builder underlines static inline functions in headers because it thinks they are unused functions
I use the following Builder version:
3.33.3-21-g6513765c1
flatpak-nightly
Steps to reproduce the problem:
- Clone latest mesa from https://gitlab.freedesktop.org/mesa/mesa
- Start Builder
- Open the mesa folder
- Use the following meson configuration:
-Ddri-drivers= -Dgallium-drivers=radeonsi,swrast,iris -Dvulkan-drivers=intel,amd -Dgallium-nine=true -Dosmesa=gallium -Dtools=nir -Dbuildtype=debug
- Open
src/gallium/state_trackers/nine/nine_shader.h
- Build the project
Expected result:
The static inline
functions in that file should not be underlined.
Actual outcome:
All the static inline
functions in that file are underlined with the following message: warning: unused function
I realize that this diagnostic probably comes from the clang static analyzer, so Builder may not have complete control over them, but it is pretty annoying to see these warnings when in fact those are not unused functions. I think in case of functions like these that are defined in header files, it is not possible to tell if they are unused by analyzing just the header file, so I would suggest to turn this warning off for header files.