summaryrefslogtreecommitdiffstats
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
commit1b3f3447138c3d8af3cbb7cc8ad6878a2567354b (patch)
treef62480fa3616a45b4edeaf7aa141ea3fe13e6790
parentc273aac3a1cff33c7d7d0778cfb50f6b9ccee922 (diff)
downloadbcm5719-llvm-1b3f3447138c3d8af3cbb7cc8ad6878a2567354b.tar.gz
bcm5719-llvm-1b3f3447138c3d8af3cbb7cc8ad6878a2567354b.zip
diagtool: simplify TreeView diagnostic classification
This utility doesn't need to know about the specifics of diagnostic levels. llvm-svn: 211323
-rw-r--r--clang/tools/diagtool/TreeView.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/tools/diagtool/TreeView.cpp b/clang/tools/diagtool/TreeView.cpp
index fd548ef011b..6cd7f2e5485 100644
--- a/clang/tools/diagtool/TreeView.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud