[clang] [analyzer] Fix _Atomic crashes for Z3 symbolic execution (PR #212050)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 26 04:26:11 PDT 2026
================
@@ -0,0 +1,20 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core \
+// RUN: -analyzer-checker=core,debug.ExprInspection \
+// RUN: -analyzer-constraints=unsupported-z3 -verify %s
+// REQUIRES: z3
+// expected-no-diagnostics
+
+void atomic_bool(_Bool input) {
+ _Atomic(_Bool) value = input;
+ if (value) {
+ }
+}
+
+typedef _Bool B1;
+typedef _Bool B2;
+
+void atomic_bool_typedef(B1 input) {
+ _Atomic(B2) value = input;
+ if (value) {
+ }
+}
----------------
rdevshp wrote:
I have added `no-crash` comments to both test cases.
https://github.com/llvm/llvm-project/pull/212050
More information about the cfe-commits
mailing list