================
@@ -0,0 +1,38 @@
+// 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
+
+// Self assignment initialization in C code will be treated as nop.
+// We will not report the VarDecl, but the following DeclRefExpr if it has not
+// yet been initialized then.
----------------
steakhal wrote:

I think this is what you wanted to express.

```suggestion
// We will report the VarDecl, only if it was left uninitialized by the time of
// a subsequent DeclRefExpr.
```

https://github.com/llvm/llvm-project/pull/187530
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to