[clang] [clang][analyzer] Fix the false positive ArgInitializedness warning on unnamed bit-field (PR #145066)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 27 08:14:31 PDT 2025
================
@@ -1,12 +1,19 @@
// RUN: %clang_analyze_cc1 %s -verify \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=true \
+// RUN: -analyzer-config core.CallAndMessage:ArgInitializedness=false \
// RUN: -analyzer-output=plist -o %t.plist
// RUN: cat %t.plist | FileCheck %s
// RUN: %clang_analyze_cc1 %s -verify=no-pointee \
// RUN: -analyzer-checker=core \
-// RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=false
+// RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=false \
+// RUN: -analyzer-config core.CallAndMessage:ArgInitializedness=false
+
+// RUN: %clang_analyze_cc1 %s -verify=arg-init \
+// RUN: -analyzer-checker=core \
+// RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=false \
+// RUN: -analyzer-config core.CallAndMessage:ArgInitializedness=true
----------------
steakhal wrote:
In general, if a test verifies the `plists`, we are usually better off not touching the test file because it may change a bunch of line numbers in the check expectations. It wasn't the case this time, so I guess it should be fine here too. As you wish.
https://github.com/llvm/llvm-project/pull/145066
More information about the cfe-commits
mailing list