1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 01:53:51 +01:00

buildsystem: Enable -Wdocumentation for LLVM

This enables warnings for incorrect Doxygen comments when build with
LLVM. To my experience, LLVM provides a low false positive rate
(e.g. it does not complain about undocumented internal macros) and has
very helpful output.

This disable `-Wdocumentation-deprecated-sync` for now, as we do not
deprecate code with attributes yet.

The warnings are not set as errors, so that we can enable this without
breaking builds.
This commit is contained in:
Marian Buschsieweke 2025-04-04 09:01:12 +02:00
parent 17d2516a54
commit d838c6aa3d
No known key found for this signature in database
GPG Key ID: 758BD52517F79C41
2 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,7 @@ CFLAGS += -Wstrict-overflow
# Worse yet they hide errors by accepting wildcard argument types.
OPTIONAL_CFLAGS += -Wstrict-prototypes
OPTIONAL_CFLAGS += -Wold-style-definition
OPTIONAL_CFLAGS += -Wdocumentation -Wno-error=documentation -Wno-documentation-deprecated-sync
# Unwanted flags for c++
CXXUWFLAGS += -std=%

View File

@ -30,6 +30,9 @@ ifneq (8, $(firstword $(shell echo 8 $(GCC_VERSION) | tr ' ' '\n' | sort -n)))
OPTIONAL_CFLAGS_BLACKLIST += -fmacro-prefix-map=$(RIOTBASE)/=
endif
# GCC does not warn about documentation (yet)
OPTIONAL_CFLAGS_BLACKLIST += -Wdocumentation -Wno-error=documentation -Wno-documentation-deprecated-sync
# We use GDB for debugging
include $(RIOTMAKE)/tools/gdb.inc.mk