diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-08 04:32:34 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-08 04:32:34 +0000 |
commit | 802e02463b880f53a6e645bde78cc412481ce9e0 (patch) | |
tree | b6f2012f2bc6123d80befbd3c038ac0f6e168632 /lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp | |
parent | eb2303c76971f3cc89bbb367ce77564ccb7042c1 (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.cpp | 7 |
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); } } } |