summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/SimpleSValuator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix another static analyzer crash due to a corner case in "folding" symbolic ↵Ted Kremenek2009-10-171-11/+16
| | | | | | values that are constrained to be a constant. llvm-svn: 84320
* Fix static analyzer crash due to recently add symbolic-value constant ↵Ted Kremenek2009-10-161-1/+9
| | | | | | | | | folding. The issue was falsely converting the constant value of the LHS of a '<<'/'>>' operation to the same APSInt value of the RHS. llvm-svn: 84269
* Fix crash introduced by r83358 where a symbol could be eagerlyTed Kremenek2009-10-061-2/+7
| | | | | | | evaluated to an APSInt with a different bitwidth than the other operand in a binary expression. llvm-svn: 83368
* Fix: <rdar://problem/7275774> Static analyzer warns about NULL pointer whenTed Kremenek2009-10-061-4/+22
| | | | | | | | | | | | | | | | | adding assert This fix required a few changes: SimpleSValuator: - Eagerly replace a symbolic value with its constant value in EvalBinOpNN when it is constrained to a constant. This allows us to better constant fold values along a path. - Handle trivial case of '<', '>' comparison of pointers when the two pointers are exactly the same. RegionStoreManager: llvm-svn: 83358
* Fix <rdar://problem/7249327> by allowing silent conversions between signed ↵Ted Kremenek2009-09-251-0/+9
| | | | | | and unsigned integer values for symbolic values. This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers. llvm-svn: 82737
* Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a wayTed Kremenek2009-09-111-6/+0
| | | | | | | | | | | | to statically type various methods in SValuator/GRState as required either a defined value or a defined-but-possibly-unknown value. This leads to various logic cleanups in GRExprEngine, and lets the compiler enforce via type checking our assumptions about what symbolic values are possibly undefined and what are not. Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values. llvm-svn: 81579
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-44/+44
| | | | llvm-svn: 81346
* Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCastTed Kremenek2009-07-211-2/+4
| | | | | | | | | to SValuator::EvalCast. In the process, the StoreManagers now use this new cast machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts involving OSAtomicCompareAndSwap and friends has been removed (and replaced with logic closer to the logic specific to those functions). llvm-svn: 76641
* RegionStore:Ted Kremenek2009-07-211-2/+20
| | | | | | | | | | -refactor logic for retrieving bindings from VarDecls into RegionStoreManager::RetrieveVar() - improve RegionStoreManager::CastRetrievedVal() and SimpleSValuate::EvalCastNL to better handle casts of values of the same canonical type as well as casts of LocAsInteger values. llvm-svn: 76516
* Enhance SimpleSValuator to handle nonloc::LocAsInteger -> location casts.Ted Kremenek2009-07-201-3/+8
| | | | llvm-svn: 76481
* Move RegionStoreManager over to using newTed Kremenek2009-07-161-4/+4
| | | | | | | | ValueManager::makeArrayIndex()/convertArrayIndex() methods. This handles yet another crash case when reasoning about array indices of different bitwidth and signedness. llvm-svn: 75884
* Enhance SimpleSValuator::EvalBinOpNN to recognize the trivial caseTed Kremenek2009-07-131-1/+20
| | | | | | | | | | | | where we are comparing a symbolic value against itself, regardless of the nature of that symbolic value. This enhancement identified a case where RegionStoreManager is not correctly symbolicating the values of the pointees of parameters. The failing test is now in 'test/Analysis/misc-ps-region-store.m', with that test file now (temporarily) marked XFAIL. llvm-svn: 75521
* Unbreak build.Ted Kremenek2009-06-261-0/+346
llvm-svn: 74238
OpenPOWER on IntegriCloud