forked from OSchip/llvm-project
[analyzer] Fixup for r162935 as per Jordan's review.
Thanks for catching this! llvm-svn: 162949
This commit is contained in:
parent
5c27c4cef0
commit
b504f44d60
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue