]> granicus.if.org Git - clang/commitdiff
[analyzer; alternate edges] don't add an edge incoming from the start of a function
authorTed Kremenek <kremenek@apple.com>
Fri, 17 May 2013 06:48:22 +0000 (06:48 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 17 May 2013 06:48:22 +0000 (06:48 +0000)
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

lib/StaticAnalyzer/Core/BugReporter.cpp

index 8388e76f511dc96aeefdbbc88bd09759702327be..6957ad737d4f577fcd114c8d5e1cf88ceefb0c38 100644 (file)
@@ -1594,14 +1594,6 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD,
       // call exit before this point.  This means that the path
       // terminated within the call itself.
       if (Optional<CallEnter> CE = P.getAs<CallEnter>()) {
-        // 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();