summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-19 23:00:52 +0000
committerAlp Toker <alp@nuanti.com>2014-06-19 23:00:52 +0000
commitd8a6309314eb4a6a97e04b04a6678ebc88920e83 (patch)
treee63f2414abfa39a99f29a7a91ee5289a8ec1b6c1 /tools
parentcd6b54b7e2bcff4818461f2e5ad4392a95b13d0c (diff)
downloadclang-d8a6309314eb4a6a97e04b04a6678ebc88920e83.tar.gz
clang-d8a6309314eb4a6a97e04b04a6678ebc88920e83.tar.bz2
clang-d8a6309314eb4a6a97e04b04a6678ebc88920e83.tar.xz
diagtool: simplify TreeView diagnostic classification
This utility doesn't need to know about the specifics of diagnostic levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/diagtool/TreeView.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/diagtool/TreeView.cpp b/tools/diagtool/TreeView.cpp
index fd548ef011..6cd7f2e548 100644
--- a/tools/diagtool/TreeView.cpp
+++ b/tools/diagtool/TreeView.cpp
@@ -50,11 +50,11 @@ static void resetColor(bool ShowColors, llvm::raw_ostream &out) {
out << llvm::sys::Process::ResetColor();
}
-static clang::DiagnosticsEngine::Level getLevel(unsigned DiagID) {
+static bool isIgnored(unsigned DiagID) {
// FIXME: This feels like a hack.
static clang::DiagnosticsEngine Diags(new DiagnosticIDs,
new DiagnosticOptions);
- return Diags.getDiagnosticLevel(DiagID, SourceLocation());
+ return Diags.isIgnored(DiagID, SourceLocation());
}
static void printGroup(llvm::raw_ostream &out, const GroupRecord &Group,
@@ -78,7 +78,7 @@ static void printGroup(llvm::raw_ostream &out, const GroupRecord &Group,
E = Group.diagnostics_end();
I != E; ++I) {
if (ShowColors) {
- if (getLevel(I->DiagID) != DiagnosticsEngine::Ignored) {
+ if (!isIgnored(I->DiagID)) {
setColor(ShowColors, out, llvm::raw_ostream::GREEN);
}
}