From 87396b9b08551ff86a788ff41da17b71e4dd4820 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 21 Feb 2013 22:23:56 +0000 Subject: Replace ProgramPoint llvm::cast support to be well-defined. See r175462 for another example/more details. llvm-svn: 175812 --- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 5b3a5187596..b656bbd83be 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -523,16 +523,16 @@ void ExprEngine::VisitLogicalExpr(const BinaryOperator* B, ExplodedNode *Pred, ProgramStateRef state = Pred->getState(); ExplodedNode *N = Pred; - while (!isa(N->getLocation())) { + while (!N->getLocation().getAs()) { ProgramPoint P = N->getLocation(); - assert(isa(P)|| isa(P)); + assert(P.getAs()|| P.getAs()); (void) P; assert(N->pred_size() == 1); N = *N->pred_begin(); } assert(N->pred_size() == 1); N = *N->pred_begin(); - BlockEdge BE = cast(N->getLocation()); + BlockEdge BE = N->getLocation().castAs(); SVal X; // Determine the value of the expression by introspecting how we @@ -643,11 +643,11 @@ void ExprEngine::VisitGuardedExpr(const Expr *Ex, for (const ExplodedNode *N = Pred ; N ; N = *N->pred_begin()) { ProgramPoint PP = N->getLocation(); - if (isa(PP) || isa(PP)) { + if (PP.getAs() || PP.getAs()) { assert(N->pred_size() == 1); continue; } - SrcBlock = cast(&PP)->getSrc(); + SrcBlock = PP.castAs().getSrc(); break; } -- cgit v1.2.3