diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-04-29 23:12:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-04-29 23:12:59 +0000 |
commit | eba09facffee3682fa634c72f7086082f3896f9c (patch) | |
tree | cd74186428f19d4dee82ac65531708c8e18ce7c9 /clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | |
parent | f0499ba991c4d51e709632c4600da97929341cff (diff) | |
download | bcm5719-llvm-eba09facffee3682fa634c72f7086082f3896f9c.tar.gz bcm5719-llvm-eba09facffee3682fa634c72f7086082f3896f9c.zip |
Revert "[analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces."
Jordan rightly pointed out that we can do the same with std::list.
llvm-svn: 180746
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index a5fe300fb67..73426da2b4d 100644 --- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -126,10 +126,10 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, // The path as already been prechecked that all parts of the path are // from the same file and that it is non-empty. - const SourceManager &SMgr = path.begin()->getLocation().getManager(); + const SourceManager &SMgr = (*path.begin())->getLocation().getManager(); assert(!path.empty()); FileID FID = - path.begin()->getLocation().asLocation().getExpansionLoc().getFileID(); + (*path.begin())->getLocation().asLocation().getExpansionLoc().getFileID(); assert(!FID.isInvalid()); // Create a new rewriter to generate HTML. @@ -139,10 +139,10 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, unsigned n = path.size(); unsigned max = n; - for (PathPieces::reverse_iterator I = path.rbegin(), + for (PathPieces::const_reverse_iterator I = path.rbegin(), E = path.rend(); I != E; ++I, --n) - HandlePiece(R, FID, *I, n, max); + HandlePiece(R, FID, **I, n, max); // Add line numbers, header, footer, etc. @@ -185,9 +185,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, << html::EscapeText(Entry->getName()) << "</td></tr>\n<tr><td class=\"rowname\">Location:</td><td>" "<a href=\"#EndPath\">line " - << path.rbegin()->getLocation().asLocation().getExpansionLineNumber() + << (*path.rbegin())->getLocation().asLocation().getExpansionLineNumber() << ", column " - << path.rbegin()->getLocation().asLocation().getExpansionColumnNumber() + << (*path.rbegin())->getLocation().asLocation().getExpansionColumnNumber() << "</a></td></tr>\n" "<tr><td class=\"rowname\">Description:</td><td>" << D.getVerboseDescription() << "</td></tr>\n"; @@ -503,16 +503,16 @@ unsigned HTMLDiagnostics::ProcessMacroPiece(raw_ostream &os, const PathDiagnosticMacroPiece& P, unsigned num) { - for (PathPieces::iterator I = P.subPieces.begin(), E=P.subPieces.end(); + for (PathPieces::const_iterator I = P.subPieces.begin(), E=P.subPieces.end(); I!=E; ++I) { if (const PathDiagnosticMacroPiece *MP = - dyn_cast<PathDiagnosticMacroPiece>(&*I)) { + dyn_cast<PathDiagnosticMacroPiece>(*I)) { num = ProcessMacroPiece(os, *MP, num); continue; } - if (PathDiagnosticEventPiece *EP = dyn_cast<PathDiagnosticEventPiece>(&*I)){ + if (PathDiagnosticEventPiece *EP = dyn_cast<PathDiagnosticEventPiece>(*I)) { os << "<div class=\"msg msgEvent\" style=\"width:94%; " "margin-left:5px\">" "<table class=\"msgT\"><tr>" |