[clang] [clang][analyzer] Add StoreToImmutable checker (PR #150417)
Endre Fülöp via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 09:05:50 PDT 2025
================
@@ -0,0 +1,32 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.core.StoreToImmutable %s
+
+// Global const variable
+const int global_const = 42;
----------------
gamesh411 wrote:
I have made the simplification, and it still has an example for a global and a local variable, demonstrating that misuses of both are detected.
https://github.com/llvm/llvm-project/pull/150417
More information about the cfe-commits
mailing list