summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/GRExprEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-1/+0
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.Zhongxing Xu2010-10-141-1/+8
| | | | llvm-svn: 116473
* Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like ↵Ted Kremenek2010-09-231-35/+2
| | | | | | VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details. llvm-svn: 114628
* Refactored BugReporter to refer to EndNode as ErrorNode. We currently make ↵Tom Care2010-09-161-1/+1
| | | | | | the assumption that EndNode == ErrorNode, but upcoming changes will break this. llvm-svn: 114065
* Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patchZhongxing Xu2010-09-161-2/+2
| | | | | | and discussions with Ted and Jordy. llvm-svn: 114056
* Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect ↵Tom Care2010-09-141-1/+1
| | | | | | that we aborted analysis may not necessarily be due to a loop. llvm-svn: 113862
* Serialization support for CXXNoexceptExpr.Sebastian Redl2010-09-101-0/+1
| | | | llvm-svn: 113627
* Implement: <rdar://problem/6351970> rule request: warn if @synchronized ↵Ted Kremenek2010-09-101-0/+1
| | | | | | mutex can be nil llvm-svn: 113573
* Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit ↵Ted Kremenek2010-09-101-1/+21
| | | | | | for checkers). llvm-svn: 113572
* Remove unused variable.Benjamin Kramer2010-09-091-1/+0
| | | | llvm-svn: 113482
* Rename GRState::getSVal() -> getRawSVal() and getSimplifiedSVal() -> getSVal().Ted Kremenek2010-09-091-12/+8
| | | | | | | | | | | | | | | | | The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering the required level of reasoning power needed to evaluate some expressions. The net win from this change is that the false positive in PR 8015 is fixed, and we also find more idempotent operations bugs. We do, however, regress with the BugReporterVisitors, which need to be modified to understand this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m which will get addressed in a future patch. plist-output.m is now marked XFAIL, while plist-output-alternate.m now tests that the plist output is working, but with the suboptimal diagnostics. This second test file will eventually be removed. llvm-svn: 113477
* Static analyzer fix: <rdar://problem/5880430> Switch on enum should not ↵Ted Kremenek2010-09-091-3/+18
| | | | | | consider default case live if all enum values are covered llvm-svn: 113457
* Fix warnings caused by new CXXUuidofExprClass enumerator.Francois Pichet2010-09-081-0/+1
| | | | llvm-svn: 113444
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-1/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* update comments.Zhongxing Xu2010-09-021-1/+3
| | | | llvm-svn: 112796
* For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and ↵Ted Kremenek2010-09-021-16/+21
| | | | | | AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics. llvm-svn: 112789
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-1/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-0/+1
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* Fix horrible GRExprEngine bug where switch statements with no 'case:' ↵Ted Kremenek2010-08-261-2/+4
| | | | | | statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>. llvm-svn: 112233
* Remove redundant cast<...>.Ted Kremenek2010-08-261-1/+1
| | | | llvm-svn: 112229
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-66/+66
| | | | | | to the new constants. llvm-svn: 112047
* Detabify.Eli Friedman2010-08-221-2/+2
| | | | llvm-svn: 111768
* Add a callback for when region changes occur. Still somewhat of a ↵Jordy Rose2010-08-141-0/+69
| | | | | | work-in-progress, but working! Effect on clients: all changes to a store now go through GRState. llvm-svn: 111078
* Add a new metadata symbol type for checkers to use. Metadata symbols must be ↵Jordy Rose2010-08-141-7/+15
| | | | | | associated with a region and will be collected if the region dies or its checker fails to mark it as in use. llvm-svn: 111076
* Zap unused UnaryOperator::OffsetOf.Eli Friedman2010-08-131-16/+0
| | | | llvm-svn: 110996
* Actually use reduced set of checkers in EvalAssume.Jordy Rose2010-08-121-2/+1
| | | | llvm-svn: 110904
* MemRegion can refer to ASTContext without external help.Zhongxing Xu2010-08-111-2/+2
| | | | llvm-svn: 110784
* Allow reference binding of a reference of Objective-C object type toDouglas Gregor2010-08-071-1/+2
| | | | | | | | an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. llvm-svn: 110513
* Removed IdempotentOperationChecker from default analysis and returned back ↵Tom Care2010-08-061-1/+0
| | | | | | | | | to a flag (-analyzer-check-idempotent-operations) - Added IdempotentOperationChecker to experimental analyses for testing purposes - Updated test cases to explictly call the checker llvm-svn: 110482
* If all nodes are sunk, bail out early. This make the later check for ↵Zhongxing Xu2010-08-061-1/+4
| | | | | | checkersEvaluated really meaningful. llvm-svn: 110430
* Revert r110317, and add a comment why the assertion is not an invariant.Ted Kremenek2010-08-051-4/+4
| | | | llvm-svn: 110330
* Turn the predicate into an assertion. When could the unequal case happen?Zhongxing Xu2010-08-051-1/+3
| | | | llvm-svn: 110317
* Change the checker callback cache in GRExprEngine to be more compact (and ↵Jordy Rose2010-08-041-25/+64
| | | | | | | | IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept. Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit. llvm-svn: 110191
* Makes GRState::makeWithStore private, to encourage clients to make store ↵Jordy Rose2010-08-031-2/+1
| | | | | | | | changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState. This is in preparation for proposed region change notifications. No functionality change. llvm-svn: 110137
* Changed GRExprEngine to pass down a reference to itself when checkers are ↵Tom Care2010-08-031-1/+1
| | | | | | | | | doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished. - Exposed the worklist and BlockAborted flag in GRCoreEngine - Changed postanalysis checkers to use the new infrastructure llvm-svn: 110095
* Teach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, ↵Ted Kremenek2010-07-291-0/+3
| | | | | | and CharacterLiteral. Fixes an assertion failure reported in PR 7675. llvm-svn: 109719
* Remove extraneous guards around the call to getConjuredSymbolVal(). These ↵Ted Kremenek2010-07-291-6/+4
| | | | | | checks are already done within getConjuredSymbolVal() itself. llvm-svn: 109707
* Delete unnecessary const_cast.Zhongxing Xu2010-07-231-1/+1
| | | | llvm-svn: 109211
* AnalysisContext is not const.Zhongxing Xu2010-07-231-1/+1
| | | | llvm-svn: 109210
* Constify all references to Stmt* and CFGBlock* in libChecker.Zhongxing Xu2010-07-201-107/+115
| | | | llvm-svn: 108811
* Constify.Zhongxing Xu2010-07-201-8/+9
| | | | llvm-svn: 108800
* Reapply r108617.Zhongxing Xu2010-07-191-13/+26
| | | | llvm-svn: 108668
* Revert r108617, it broke the build.Benjamin Kramer2010-07-171-26/+13
| | | | llvm-svn: 108621
* Prepare the analyzer for the callee in another translation unit:Zhongxing Xu2010-07-171-13/+26
| | | | | | | Let AnalysisContext contain a TranslationUnit. Let CallEnter refer to an AnalysisContext instead of a FunctionDecl. llvm-svn: 108617
* Fix '<rdar://problem/8202272> __imag passed non-complex should not crash' by ↵Ted Kremenek2010-07-171-2/+1
| | | | | | removing a bogus assertion. llvm-svn: 108602
* Improved false positive rate for the idempotent operations checker and moved ↵Tom Care2010-07-161-0/+1
| | | | | | | | | | it into the default path-sensitive analysis options. - Added checks for static local variables, self assigned parameters, and truncating/extending self assignments - Removed command line option (now default with --analyze) - Updated test cases to pass with idempotent operation warnings llvm-svn: 108550
* Introduce a new cast kind for an "lvalue bitcast", which handlesDouglas Gregor2010-07-131-0/+1
| | | | | | | | | | | | | | | | reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast<short&>(i); The IR generated for this is essentially the same as for *reinterpret_cast<short*>(&i). Fixes PR6437, PR7593, and PR7344. llvm-svn: 108294
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-081-2/+2
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-071-2/+2
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect itsDouglas Gregor2010-07-071-2/+2
| | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828
OpenPOWER on IntegriCloud