summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/logical-ops.c
Commit message (Collapse)AuthorAgeFilesLines
* [Sema]. Warn when logical expression is a pointerFariborz Jahanian2014-11-141-1/+1
| | | | | | | which evaluates to true. rdar://18716393. Reviewed by Richard Trieu llvm-svn: 222009
* Revert r221702 until I address Richard Trieu'sFariborz Jahanian2014-11-111-2/+1
| | | | | | comments. llvm-svn: 221714
* Patch to warn when logical evaluation of operand evalutes to a true value;Fariborz Jahanian2014-11-111-1/+2
| | | | | | | That this is a c-only patch. c++ already has this warning. This addresses rdar://18716393 llvm-svn: 221702
* [analyzer] Refactor conditional expression evaluating codePavel Labath2013-08-231-0/+12
| | | | | | | | | | | | | | | | | | | Summary: Instead of digging through the ExplodedGraph, to figure out which edge brought us here, I compute the value of conditional expression by looking at the sub-expression values. To do this, I needed to change the liveness algorithm a bit -- now, the full conditional expression also depends on all atomic sub-expressions, not only the outermost ones. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1340 llvm-svn: 189090
* [analyzer] The result of && or || is always a 1 or 0.Jordan Rose2012-08-201-0/+27
Forgetting to at least cast the result was giving us Loc/NonLoc problems in SValBuilder (hitting an assertion). But the standard (both C and C++) does actually guarantee that && and || will result in the actual values 1 and 0, typed as 'int' in C and 'bool' in C++, and we can easily model that. PR13461 llvm-svn: 162209
OpenPOWER on IntegriCloud