diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-21 20:58:29 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-21 20:58:29 +0000 |
commit | fdf6a279c9a75c778eba382d9a156697092982a1 (patch) | |
tree | e67bc01445260b8cd78ddfd21f1a9f4fe059ac79 /lib/StaticAnalyzer/Core/PathDiagnostic.cpp | |
parent | 05f8ff134d5f270bd7bfe4aaef491bd3febddea1 (diff) |
Replace CFGElement llvm::cast support to be well-defined.
See r175462 for another example/more details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/PathDiagnostic.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 69a4e2706a..12d85db7cb 100644 --- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -479,15 +479,15 @@ getLocationForCaller(const StackFrameContext *SFC, case CFGElement::Invalid: llvm_unreachable("Invalid CFGElement"); case CFGElement::Statement: - return PathDiagnosticLocation(cast<CFGStmt>(Source).getStmt(), + return PathDiagnosticLocation(Source.castAs<CFGStmt>().getStmt(), SM, CallerCtx); case CFGElement::Initializer: { - const CFGInitializer &Init = cast<CFGInitializer>(Source); + const CFGInitializer &Init = Source.castAs<CFGInitializer>(); return PathDiagnosticLocation(Init.getInitializer()->getInit(), SM, CallerCtx); } case CFGElement::AutomaticObjectDtor: { - const CFGAutomaticObjDtor &Dtor = cast<CFGAutomaticObjDtor>(Source); + const CFGAutomaticObjDtor &Dtor = Source.castAs<CFGAutomaticObjDtor>(); return PathDiagnosticLocation::createEnd(Dtor.getTriggerStmt(), SM, CallerCtx); } |