mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gmacros: Only set G_ANALYZER_ANALYZING to 1 when clang static analyzer is in use
We set G_ANALYZER_ANALYZING to 1 when clang supporting static analyzing before, but this will cause compilation error when -Werror=return-type is used and the static analyzer is not in use because g_error static function only has __attribute__((analyzer_noreturn)), which is useless for normal compilation. https://bugzilla.gnome.org/show_bug.cgi?id=741901
This commit is contained in:
parent
cb86c222cc
commit
d7a1d890c1
@ -164,7 +164,7 @@
|
||||
#endif /* !__GNUC__ */
|
||||
#endif /* !G_DISABLE_DEPRECATED */
|
||||
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
#if __has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__)
|
||||
#define G_ANALYZER_ANALYZING 1
|
||||
#define G_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user