From 34d1a0a1522c7bcc7bf431f5b9a92cde3f2315fd Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 31 May 2013 06:11:11 +0000 Subject: [PATCH] [analyzer;alternate arrows] Rename 'adjustBranchEdges' to 'splitBranchConditionEdges'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182986 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/BugReporter.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 2fb1a26cc2..21a2af4efe 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -2227,8 +2227,13 @@ static bool optimizeEdges(PathPieces &path, SourceManager &SM, return hasChanges; } -static void adjustBranchEdges(PathPieces &pieces, LocationContextMap &LCM, - SourceManager &SM) { +/// \brief Split edges incident on a branch condition into two edges. +/// +/// The first edge is incident on the branch statement, the second on the +/// condition. +static void splitBranchConditionEdges(PathPieces &pieces, + LocationContextMap &LCM, + SourceManager &SM) { // Retrieve the parent map for this path. const LocationContext *LC = LCM[&pieces]; ParentMap &PM = LC->getParentMap(); @@ -2237,7 +2242,7 @@ static void adjustBranchEdges(PathPieces &pieces, LocationContextMap &LCM, Prev = I, ++I) { // Adjust edges in subpaths. if (PathDiagnosticCallPiece *Call = dyn_cast(*I)) { - adjustBranchEdges(Call->path, LCM, SM); + splitBranchConditionEdges(Call->path, LCM, SM); continue; } @@ -3023,7 +3028,7 @@ bool GRBugReporter::generatePathDiagnostic(PathDiagnostic& PD, // Adjust edges into loop conditions to make them more uniform // and aesthetically pleasing. - adjustBranchEdges(PD.getMutablePieces(), LCM, SM); + splitBranchConditionEdges(PD.getMutablePieces(), LCM, SM); } } -- 2.40.0