Fix a potential null dereference in the pointer-to-bool evaluator; caught by
Eli Friedman.
llvm-svn: 103297
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index b6613e7..c534d03 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -115,7 +115,7 @@
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;