[clang] [clang][analyzer] Diagnose dead stores on parenthesized lvalues (PR #227176)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 01:39:44 PDT 2026
================
@@ -660,3 +660,12 @@ int rdar34122265_test_nested(int input) {
}
return bar.x.x + bar.y.y;
}
+
+// Parentheses on the left-hand side must not hide a dead store.
+int dead_store_to_parenthesized_variable(int input) {
+ int value;
+ (value) = input;
----------------
ojhunt wrote:
can you add a test for value being a wider type than int?
https://github.com/llvm/llvm-project/pull/227176
More information about the cfe-commits
mailing list