From 2a01f5d426c6bb0ef57c0a018942f6f6b179827a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 21 Feb 2013 20:58:29 +0000 Subject: Replace CFGElement llvm::cast support to be well-defined. See r175462 for another example/more details. llvm-svn: 175796 --- clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp') diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp index e8ad775cf4a..7b63d67911c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp @@ -236,8 +236,8 @@ void MallocOverflowSecurityChecker::checkASTCodeBody(const Decl *D, CFGBlock *block = *it; for (CFGBlock::iterator bi = block->begin(), be = block->end(); bi != be; ++bi) { - if (const CFGStmt *CS = bi->getAs()) { - if (const CallExpr *TheCall = dyn_cast(CS->getStmt())) { + if (CFGStmt CS = bi->getAs()) { + if (const CallExpr *TheCall = dyn_cast(CS.getStmt())) { // Get the callee. const FunctionDecl *FD = TheCall->getDirectCallee(); -- cgit v1.2.3