r182986 - [analyzer; alternate arrows] Rename 'adjustBranchEdges' to 'splitBranchConditionEdges'.
Ted Kremenek
kremenek at apple.com
Thu May 30 23:11:12 PDT 2013
Author: kremenek
Date: Fri May 31 01:11:11 2013
New Revision: 182986
URL: http://llvm.org/viewvc/llvm-project?rev=182986&view=rev
Log:
[analyzer;alternate arrows] Rename 'adjustBranchEdges' to 'splitBranchConditionEdges'.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=182986&r1=182985&r2=182986&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Fri May 31 01:11:11 2013
@@ -2227,8 +2227,13 @@ static bool optimizeEdges(PathPieces &pa
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
Prev = I, ++I) {
// Adjust edges in subpaths.
if (PathDiagnosticCallPiece *Call = dyn_cast<PathDiagnosticCallPiece>(*I)) {
- adjustBranchEdges(Call->path, LCM, SM);
+ splitBranchConditionEdges(Call->path, LCM, SM);
continue;
}
@@ -3023,7 +3028,7 @@ bool GRBugReporter::generatePathDiagnost
// Adjust edges into loop conditions to make them more uniform
// and aesthetically pleasing.
- adjustBranchEdges(PD.getMutablePieces(), LCM, SM);
+ splitBranchConditionEdges(PD.getMutablePieces(), LCM, SM);
}
}
More information about the cfe-commits
mailing list