[clang] [analyzer] Suppress EnumCastOutOfRange diagnostics in system headers (PR #196323)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon May 11 02:55:03 PDT 2026
================
@@ -0,0 +1,12 @@
+// RUN: %clang_analyze_cc1 \
+// RUN: -analyzer-checker=core,optin.core.EnumCastOutOfRange \
+// RUN: -isystem %S/Inputs \
+// RUN: -verify %s
+
+#include "enum-system-header.h"
+
+void test() {
+ bad_cast(100);
+}
----------------
steakhal wrote:
I don't like that we demonstrate this suppression with a true-positive report.
I think we should motivate the suppression with a genuine false-positive report.
https://github.com/llvm/llvm-project/pull/196323
More information about the cfe-commits
mailing list