forked from OSchip/llvm-project
Fix a potential null dereference in the pointer-to-bool evaluator; caught by
Eli Friedman. llvm-svn: 103297
This commit is contained in:
parent
45d55e4f26
commit
06f0e09756
|
@ -115,7 +115,7 @@ static bool EvalPointerValueAsBool(LValue& Value, bool& Result) {
|
|||
|
||||
Result = Base || !Value.Offset.isZero();
|
||||
|
||||
const DeclRefExpr* DeclRef = dyn_cast<DeclRefExpr>(Base);
|
||||
const DeclRefExpr* DeclRef = dyn_cast_or_null<DeclRefExpr>(Base);
|
||||
if (!DeclRef)
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue