]> granicus.if.org Git - clang/commit
[analyzer] When performing a binary operation on symbolic operands, we convert the...
authorJordy Rose <jediknil@belkadan.com>
Wed, 15 Jun 2011 04:55:49 +0000 (04:55 +0000)
committerJordy Rose <jediknil@belkadan.com>
Wed, 15 Jun 2011 04:55:49 +0000 (04:55 +0000)
commita9af8e71bba24d2a1d1827972ef4cd856c179e56
treebc7778864266ee56d81eca499ab2731a21771d68
parent55080a78c81733021b45fc3a47541619e4470883
[analyzer] When performing a binary operation on symbolic operands, we convert the symbol values to a common type. But in a relational operation, the result is an 'int' or 'bool', which may not be the appropriate type to convert the operands to. In these cases, use the left-hand operand's type as the conversion type.

There's no associated test for this because fully-constrained symbolic values are evaluated ahead of time in normal expressions. This can only come up in checker-constructed expressions (like the ones in an upcoming patch to CStringChecker).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133041 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp