diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-08-27 21:39:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-08-27 21:39:14 +0000 |
commit | 996bfab49938ea6332f999e6218c69c6784c8065 (patch) | |
tree | 95b19540d24be723f37af9f3ddbdc5085b63ac43 /clang/lib/StaticAnalyzer/Core | |
parent | 60120fb1b137d7176ccbf73e979ab7f575e377a6 (diff) | |
download | bcm5719-llvm-996bfab49938ea6332f999e6218c69c6784c8065.tar.gz bcm5719-llvm-996bfab49938ea6332f999e6218c69c6784c8065.zip |
[analyzer] Rename current PathDiagnosticClient::HandlePathDiagnostic() to HandlePathDiagnosticImpl(), and slot in new HandlePathDiagnostic() for potentially handling concurrent access to PathDiagnosticClients (in the future).
llvm-svn: 138713
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core')
4 files changed, 13 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index 68a6618878d..2b377d0078e 100644 --- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -47,7 +47,7 @@ public: virtual void FlushDiagnostics(SmallVectorImpl<std::string> *FilesMade); - virtual void HandlePathDiagnostic(const PathDiagnostic* D); + virtual void HandlePathDiagnosticImpl(const PathDiagnostic* D); virtual StringRef getName() const { return "HTMLDiagnostics"; @@ -88,7 +88,7 @@ ento::createHTMLDiagnosticClient(const std::string& prefix, // Report processing. //===----------------------------------------------------------------------===// -void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic* D) { +void HTMLDiagnostics::HandlePathDiagnosticImpl(const PathDiagnostic* D) { if (!D) return; diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 7f95c950dd9..e56f1572e92 100644 --- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -117,6 +117,13 @@ void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel, HandlePathDiagnostic(D); } +void PathDiagnosticClient::HandlePathDiagnostic(const PathDiagnostic *D) { + // For now this simply forwards to HandlePathDiagnosticImpl. In the future + // we can use this indirection to control for multi-threaded access to + // the PathDiagnosticClient from multiple bug reporters. + HandlePathDiagnosticImpl(D); +} + //===----------------------------------------------------------------------===// // PathDiagnosticLocation methods. //===----------------------------------------------------------------------===// diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index cae5bc9a34c..3133be7860a 100644 --- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -74,7 +74,7 @@ namespace { void FlushDiagnostics(SmallVectorImpl<std::string> *FilesMade); - void HandlePathDiagnostic(const PathDiagnostic* D); + void HandlePathDiagnosticImpl(const PathDiagnostic* D); virtual StringRef getName() const { return "PlistDiagnostics"; @@ -321,7 +321,7 @@ static void ReportDiag(raw_ostream &o, const PathDiagnosticPiece& P, } } -void PlistDiagnostics::HandlePathDiagnostic(const PathDiagnostic* D) { +void PlistDiagnostics::HandlePathDiagnosticImpl(const PathDiagnostic* D) { if (!D) return; diff --git a/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp index c4665ef0975..e91b48d9fe3 100644 --- a/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp @@ -31,7 +31,7 @@ public: TextPathDiagnostics(const std::string& output, Diagnostic &diag) : OutputFile(output), Diag(diag) {} - void HandlePathDiagnostic(const PathDiagnostic* D); + void HandlePathDiagnosticImpl(const PathDiagnostic* D); void FlushDiagnostics(SmallVectorImpl<std::string> *FilesMade) { } @@ -53,7 +53,7 @@ ento::createTextPathDiagnosticClient(const std::string& out, return new TextPathDiagnostics(out, PP.getDiagnostics()); } -void TextPathDiagnostics::HandlePathDiagnostic(const PathDiagnostic* D) { +void TextPathDiagnostics::HandlePathDiagnosticImpl(const PathDiagnostic* D) { if (!D) return; |