summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/AttrNonNullChecker.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-12-01 11:08:04 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-12-01 11:08:04 +0000
commit4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa (patch)
tree867cbbe32a66fd7d62dd9ce9df23a23fefdb8290 /lib/Analysis/AttrNonNullChecker.cpp
parent6df2408694f81a03eb8b0e3b013272042233c061 (diff)
downloadFreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.zip
FreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.tar.gz
Update clang to r90226.
Diffstat (limited to 'lib/Analysis/AttrNonNullChecker.cpp')
-rw-r--r--lib/Analysis/AttrNonNullChecker.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Analysis/AttrNonNullChecker.cpp b/lib/Analysis/AttrNonNullChecker.cpp
index 01e1a1f..aa21700 100644
--- a/lib/Analysis/AttrNonNullChecker.cpp
+++ b/lib/Analysis/AttrNonNullChecker.cpp
@@ -19,7 +19,7 @@
using namespace clang;
namespace {
-class VISIBILITY_HIDDEN AttrNonNullChecker
+class AttrNonNullChecker
: public CheckerVisitor<AttrNonNullChecker> {
BugType *BT;
public:
@@ -39,7 +39,6 @@ void clang::RegisterAttrNonNullChecker(GRExprEngine &Eng) {
void AttrNonNullChecker::PreVisitCallExpr(CheckerContext &C,
const CallExpr *CE) {
const GRState *state = C.getState();
- const GRState *originalState = state;
// Check if the callee has a 'nonnull' attribute.
SVal X = state->getSVal(CE->getCallee());
@@ -74,7 +73,7 @@ void AttrNonNullChecker::PreVisitCallExpr(CheckerContext &C,
if (stateNull && !stateNotNull) {
// Generate an error node. Check for a null node in case
// we cache out.
- if (ExplodedNode *errorNode = C.GenerateNode(CE, stateNull, true)) {
+ if (ExplodedNode *errorNode = C.GenerateSink(stateNull)) {
// Lazily allocate the BugType object if it hasn't already been
// created. Ownership is transferred to the BugReporter object once
@@ -109,6 +108,5 @@ void AttrNonNullChecker::PreVisitCallExpr(CheckerContext &C,
// If we reach here all of the arguments passed the nonnull check.
// If 'state' has been updated generated a new node.
- if (state != originalState)
- C.addTransition(C.GenerateNode(CE, state));
+ C.addTransition(state);
}
OpenPOWER on IntegriCloud