[clang] [analyzer] Ignoring `T v=v; ` idiom for uninitialized variable checker and dead store checker (PR #187530)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 04:35:06 PDT 2026
================
@@ -0,0 +1,65 @@
+// RUN: %clang_analyze_cc1 -xc %s \
+// RUN: -analyzer-checker=core,debug.ExprInspection,deadcode.DeadStores \
+// RUN: -verify
+// RUN: %clang_analyze_cc1 -xc++ %s \
+// RUN: -analyzer-checker=core,debug.ExprInspection,deadcode.DeadStores \
+// RUN: -verify -w
----------------
steakhal wrote:
I've noticed that `-w` is only present for C++. Is that intentional?
I've reshuffled the flags to avoid an extra line, and to also share the longest common prefix of the commands to make the -x/-xc++ stand out more.
```suggestion
// RUN: %clang_analyze_cc1 -verify -w %s -xc \
// RUN: -analyzer-checker=core,debug.ExprInspection,deadcode.DeadStores
// RUN: %clang_analyze_cc1 -verify -w %s -xc++ \
// RUN: -analyzer-checker=core,debug.ExprInspection,deadcode.DeadStores
```
https://github.com/llvm/llvm-project/pull/187530
More information about the cfe-commits
mailing list