[analyzer] Fixup for r162935 as per Jordan's review.

Thanks for catching this!

llvm-svn: 162949
This commit is contained in:
Anna Zaks 2012-08-30 22:42:41 +00:00
parent 5c27c4cef0
commit b504f44d60
3 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,7 @@ public:
/// Returns true if the predecessor is within an inlined function/method.
bool isWithinInlined() {
return (getStackFrame() != 0);
return (getStackFrame()->getParent() != 0);
}
BugReporter &getBugReporter() {

View File

@ -736,9 +736,9 @@ ProgramStateRef assumeExprIsNonNull(const Expr *NonNullExpr,
ProgramStateRef State,
CheckerContext &C) {
SVal Val = State->getSVal(NonNullExpr, C.getLocationContext());
if (!isa<DefinedOrUnknownSVal>(Val))
return State;
return State->assume(cast<DefinedOrUnknownSVal>(Val), true);
if (DefinedOrUnknownSVal *DV = dyn_cast<DefinedOrUnknownSVal>(&Val))
return State->assume(cast<DefinedOrUnknownSVal>(*DV), true);
return State;
}
void ObjCNonNilReturnValueChecker::checkPostObjCMessage(const ObjCMethodCall &M,

View File

@ -24,7 +24,7 @@ typedef signed char BOOL;
@implementation Cell
- (id) init {
if ((self = [super init])) {
;
return self;
}
// Test that this is being analyzed.
int m;