#define _GNU_SOURCE
#define __USE_GNU
+#if defined(__clang_analyzer__)
+/* clang analyzer acts as DEBUG_VALIDATION in some places, so
+ * force this so #ifdef DEBUG_VALIDATION code gets included */
+#define DEBUG_VALIDATION 1
+#endif
+
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
#define SC_ADDRESS_SANITIZER 1
#define DEBUG_VALIDATE_BUG_ON(exp) BUG_ON((exp))
-#elif defined(__clang_analyzer__)
-
-#define DEBUG_ASSERT_FLOW_LOCKED(f)
-#define DEBUG_VALIDATE_FLOW(f)
-#define DEBUG_VALIDATE_PACKET(p)
-#define DEBUG_VALIDATE_BUG_ON(exp) BUG_ON((exp))
-/* define macro so we also get #ifdef DEBUG_VALIDATION code */
-#define DEBUG_VALIDATION 1
-
#else /* DEBUG_VALIDATE */
#define DEBUG_ASSERT_FLOW_LOCKED(f)