summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/diagnostics/deref-track-symbolic-region.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] BugReporter - more precise tracking of C++ referencesAnna Zaks2013-03-131-0/+15
| | | | | | | | | | | | | | | | When BugReporter tracks C++ references involved in a null pointer violation, we want to differentiate between a null reference and a reference to a null pointer. In the first case, we want to track the region for the reference location; in the second, we want to track the null pointer. In addition, the core creates CXXTempObjectRegion to represent the location of the C++ reference, so teach FindLastStoreBRVisitor about it. This helps null pointer suppression to kick in. (Patch by Anna and Jordan.) llvm-svn: 176969
* [analyzer] Add test case for reference to null pointer param checkAnna Zaks2013-03-091-0/+12
| | | | | | This tests that we track the original Expr if getDerefExpr fails. llvm-svn: 176754
* [analyzer] Use 'MemRegion::printPretty()' instead of assuming the region is ↵Ted Kremenek2013-02-261-1/+1
| | | | | | | | | | | | a VarRegion. Fixes PR15358 and <rdar://problem/13295437>. Along the way, shorten path diagnostics that say "Variable 'x'" to just be "'x'". By the context, it is obvious that we have a variable, and so this just consumes text space. llvm-svn: 176115
* TrackConstraintBRVisitor and ConditionBRVisitor can emit similarTed Kremenek2012-10-251-2/+1
| | | | | | | | | | | | path notes for cases where a value may be assumed to be null, etc. Instead of having redundant diagnostics, do a pass over the generated PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor that are already covered by ConditionBRVisitor, whose notes tend to be better. Fixes <rdar://problem/12252783> llvm-svn: 166728
* Fix bug in ConditionBRVisitor where for C++ (and not C) we were not ignoringTed Kremenek2012-09-071-0/+1
| | | | | | | | | | | | | | | | implicit pointer-to-boolean conversions in condition expressions. This would result in inconsistent diagnostic emission between C and C++. A consequence of this is now ConditionBRVisitor and TrackConstraintBRVisitor may emit redundant diagnostics, for example: "Assuming pointer value is null" (TrackConstraintBRVisitor) "Assuming 'p' is null" (ConditionBRVisitor) We need to reconcile the two, and perhaps prefer one over the other in some cases. llvm-svn: 163372
* [analyzer] Enhance the member expr tracking to account for references.Anna Zaks2012-09-051-0/+16
As per Jordan's suggestion. (Came out of code review for r163261.) llvm-svn: 163269
OpenPOWER on IntegriCloud