[cfe-commits] r103297 - /cfe/trunk/lib/AST/ExprConstant.cpp
John McCall
rjmccall at apple.com
Fri May 7 14:01:17 PDT 2010
Author: rjmccall
Date: Fri May 7 16:01:17 2010
New Revision: 103297
URL: http://llvm.org/viewvc/llvm-project?rev=103297&view=rev
Log:
Fix a potential null dereference in the pointer-to-bool evaluator; caught by
Eli Friedman.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=103297&r1=103296&r2=103297&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Fri May 7 16:01:17 2010
@@ -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;
More information about the cfe-commits
mailing list