> Okay, then there is in fact a potential crash here.
Is the attached patch OK?
Cheers,
--
Rafael Ávila de Espíndola
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 7f83173..b92c573 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -74,7 +74,7 @@ static bool EvalPointerValueAsBool(APValue& Value, bool& Result) {
Result = Base || !Value.getLValueOffset().isZero();
- const DeclRefExpr* DeclRef = dyn_cast<DeclRefExpr>(Base);
+ const DeclRefExpr* DeclRef = dyn_cast_or_null<DeclRefExpr>(Base);
if (!DeclRef)
return true;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits