3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-11 21:02:30 +00:00

Fix static analysis issues: null dereferences, unsafe casts, branch clones, uninitialized members (#9424)

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/6e64242e-78e5-4807-8369-02baaf405a70

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-04-29 13:37:11 -07:00 committed by GitHub
parent 09396b72dd
commit 7c4c709708
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 26 additions and 29 deletions

View file

@ -18,12 +18,12 @@ Revision History:
--*/
#include "ast/ast.h"
#define check_symbol(S1,S2) if (S1 != S2) return lt(S1,S2)
#define check_value(V1,V2) if (V1 != V2) return V1 < V2
#define check_bool(B1,B2) if (B1 != B2) return !B1 && B2
#define check_ptr(P1,P2) if (!P1 && P2) return true; if (P1 && !P2) return false
#define check_ast(T1,T2) if (T1 != T2) { n1 = T1; n2 = T2; goto start; }
#define check_zstring(S1, S2) if (S1 != S2) return S1 < S2
#define check_symbol(S1,S2) if ((S1) != (S2)) return lt((S1),(S2))
#define check_value(V1,V2) if ((V1) != (V2)) return (V1) < (V2)
#define check_bool(B1,B2) if ((B1) != (B2)) return !(B1) && (B2)
#define check_ptr(P1,P2) if (!(P1) && (P2)) return true; if ((P1) && !(P2)) return false
#define check_ast(T1,T2) if ((T1) != (T2)) { n1 = (T1); n2 = (T2); goto start; }
#define check_zstring(S1, S2) if ((S1) != (S2)) return (S1) < (S2)
#define check_parameter(p1, p2) { \
check_value(p1.get_kind(), p2.get_kind()); \