summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-10-31 18:41:15 +0000
committerJordan Rose <jordan_rose@apple.com>2013-10-31 18:41:15 +0000
commit1417a7b174d1158344356aa21c6dc8474c21e287 (patch)
tree544ddb8b7c929f6f19eecac43b9850ca9af3d43a /clang/lib
parentb78b1b2330e5f7a479466052994c6695b4481356 (diff)
downloadbcm5719-llvm-1417a7b174d1158344356aa21c6dc8474c21e287.tar.gz
bcm5719-llvm-1417a7b174d1158344356aa21c6dc8474c21e287.zip
[analyzer] Don't crash when a path goes through a 'delete' destructor call.
This was just left unimplemnted from r191381; the fix is to report this call location as the location of the 'delete' expr. PR17746 llvm-svn: 193783
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index 8099cd3b74a..b504db6349e 100644
--- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
@@ -560,7 +560,8 @@ getLocationForCaller(const StackFrameContext *SFC,
SM, CallerCtx);
}
case CFGElement::DeleteDtor: {
- llvm_unreachable("not yet implemented!");
+ const CFGDeleteDtor &Dtor = Source.castAs<CFGDeleteDtor>();
+ return PathDiagnosticLocation(Dtor.getDeleteExpr(), SM, CallerCtx);
}
case CFGElement::BaseDtor:
case CFGElement::MemberDtor: {
OpenPOWER on IntegriCloud