From 24d052cdb75d3c1afa5bef32eacaa224e9d0b85d Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Sat, 10 Dec 2011 23:36:51 +0000 Subject: [analyzer] Introduce IntSymExpr, where the integer is on the lhs. Fix a bug in SimpleSValBuilder, where we should swap lhs and rhs when calling generateUnknownVal(), - the function which creates symbolic expressions when data is tainted. The issue is not visible when we only create the expressions for taint since all expressions are commutative from taint perspective. Refactor SymExpr::symbol_iterator::expand() to use a switch instead of a chain of ifs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146336 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/ProgramState.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/StaticAnalyzer/Core/ProgramState.cpp') diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index 807def26ff..43b0b3e942 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -565,6 +565,8 @@ bool ScanReachableSymbols::scan(const SymExpr *sym) { return scan(cast(sym)->getOperand()); case SymExpr::SymIntKind: return scan(cast(sym)->getLHS()); + case SymExpr::IntSymKind: + return scan(cast(sym)->getRHS()); case SymExpr::SymSymKind: { const SymSymExpr *x = cast(sym); return scan(x->getLHS()) && scan(x->getRHS()); -- cgit v1.2.3