Fix a potential null dereference in the pointer-to-bool evaluator; caught by

Eli Friedman.

llvm-svn: 103297
This commit is contained in:
John McCall 2010-05-07 21:01:17 +00:00
parent 45d55e4f26
commit 06f0e09756
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ static bool EvalPointerValueAsBool(LValue& Value, bool& Result) {
Result = Base || !Value.Offset.isZero(); Result = Base || !Value.Offset.isZero();
const DeclRefExpr* DeclRef = dyn_cast<DeclRefExpr>(Base); const DeclRefExpr* DeclRef = dyn_cast_or_null<DeclRefExpr>(Base);
if (!DeclRef) if (!DeclRef)
return true; return true;