libsystemd: Skip _sd-common.h include check when __clang_analyzer__ is defined

This check doesn't work properly when tools such as clang-tidy are
analyzing headers. Since we don't care about the check in that case,
skip it if __clang_analyzer__ is defined similar to how we skip it as
well if __COVERITY__ is defined.
This commit is contained in:
Daan De Meyer
2025-04-23 11:50:32 +02:00
parent ed2506d1d0
commit 84104ad613
+1 -1
View File
@@ -19,7 +19,7 @@
/* This is a private header; never even think of including this directly! */
#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 && !defined(__COVERITY__)
#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 && !defined(__COVERITY__) && !defined(__clang_analyzer__)
# error "Do not include _sd-common.h directly; it is a private header."
#endif