From: Ted Kremenek Date: Fri, 17 May 2013 06:48:22 +0000 (+0000) Subject: [analyzer; alternate edges] don't add an edge incoming from the start of a function X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbfa950abe0e55b173286a306ee620eff5f72ea8;p=clang [analyzer; alternate edges] don't add an edge incoming from the start of a function for a nested call. This matches what we do with the first stack frame. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182078 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 8388e76f51..6957ad737d 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1594,14 +1594,6 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD, // call exit before this point. This means that the path // terminated within the call itself. if (Optional CE = P.getAs()) { - // Add an edge to the start of the function. - const StackFrameContext *CalleeLC = CE->getCalleeContext(); - PathDiagnosticLocation &PrevLocCallee = PrevLocMap[CalleeLC]; - const Decl *D = CalleeLC->getDecl(); - addEdgeToPath(PD.getActivePath(), PrevLocCallee, - PathDiagnosticLocation::createBegin(D, SM), - CalleeLC); - // Did we visit an entire call? bool VisitedEntireCall = PD.isWithinCall(); PD.popActivePath();