diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-03-06 01:25:01 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-03-06 01:25:01 +0000 |
commit | 097ebb3d8ce55d1f78a3f1e7a0978dbde5ee2898 (patch) | |
tree | 7231fb6c913f2f17f4ded23692fd89585b573726 /lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | 2dd17abf11ae64339fa6bfaa57d76e13a5fbe5b8 (diff) |
[analyzer] add a diagnostic event when entering a call via inlining, within the callee, and add an edge.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152086 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 73e00e4416..53fedaf2a1 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1233,10 +1233,18 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, // Pop the call hierarchy if we are done walking the contents // of a function call. if (const CallEnter *CE = dyn_cast<CallEnter>(&P)) { + // Add an edge to the start of the function. + const Decl *D = CE->getCalleeContext()->getDecl(); + PathDiagnosticLocation pos = + PathDiagnosticLocation::createBegin(D, SM); + EB.addEdge(pos); + + // Flush all locations, and pop the active path. EB.flushLocations(); PD.popActivePath(); assert(!PD.getActivePath().empty()); PDB.LC = N->getLocationContext(); + // The current active path should never be empty. Either we // just added a bunch of stuff to the top-level path, or // we have a previous CallExit. If the front of the active |