aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-02-08 04:32:34 +0000
committerTed Kremenek <kremenek@apple.com>2012-02-08 04:32:34 +0000
commit802e02463b880f53a6e645bde78cc412481ce9e0 (patch)
treeb6f2012f2bc6123d80befbd3c038ac0f6e168632 /lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
parenteb2303c76971f3cc89bbb367ce77564ccb7042c1 (diff)
Change PathDiagnosticPieces to be reference counted (simplifying their management), and introduce 'PathPieces' as a common container for PathDiagnosticPieces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp b/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
index 0c6b228274..fe912dfd21 100644
--- a/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
+++ b/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
@@ -58,11 +58,12 @@ void TextPathDiagnostics::FlushDiagnosticsImpl(
for (std::vector<const PathDiagnostic *>::iterator it = Diags.begin(),
et = Diags.end(); it != et; ++it) {
const PathDiagnostic *D = *it;
- for (PathDiagnostic::const_iterator I=D->begin(), E=D->end(); I != E; ++I) {
+ for (PathPieces::const_iterator I = D->path.begin(), E = D->path.end();
+ I != E; ++I) {
unsigned diagID =
Diag.getDiagnosticIDs()->getCustomDiagID(DiagnosticIDs::Note,
- I->getString());
- Diag.Report(I->getLocation().asLocation(), diagID);
+ (*I)->getString());
+ Diag.Report((*I)->getLocation().asLocation(), diagID);
}
}
}