From 0764573a17b0796427f505c1cc7b53c33aeba25e Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Fri, 22 Jun 2012 00:33:20 +0000 Subject: [PATCH] [diagtool] Write to llvm::outs() by default instead of llvm::errs() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158954 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Misc/warning-flags-enabled.c | 12 ++++++------ test/Misc/warning-flags.c | 2 +- tools/diagtool/diagtool_main.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Misc/warning-flags-enabled.c b/test/Misc/warning-flags-enabled.c index 359ba708e2..1c1c38f864 100644 --- a/test/Misc/warning-flags-enabled.c +++ b/test/Misc/warning-flags-enabled.c @@ -1,4 +1,4 @@ -// RUN: diagtool show-enabled %s 2>&1 | FileCheck %s +// RUN: diagtool show-enabled %s | FileCheck %s // // This shows warnings which are on by default. // We just check a few to make sure it's doing something sensible. @@ -8,18 +8,18 @@ // CHECK: warn_unterminated_string -// RUN: diagtool show-enabled -Wno-everything %s 2>&1 | count 0 +// RUN: diagtool show-enabled -Wno-everything %s | count 0 -// RUN: diagtool show-enabled -Wno-everything -Wobjc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-WARN %s -// RUN: diagtool show-enabled -Wno-everything -Werror=objc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s -// RUN: diagtool show-enabled -Wno-everything -Wfatal-errors=objc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-FATAL %s +// RUN: diagtool show-enabled -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-WARN %s +// RUN: diagtool show-enabled -Wno-everything -Werror=objc-root-class %s | FileCheck -check-prefix CHECK-ERROR %s +// RUN: diagtool show-enabled -Wno-everything -Wfatal-errors=objc-root-class %s | FileCheck -check-prefix CHECK-FATAL %s // // CHECK-WARN: W warn_objc_root_class_missing [-Wobjc-root-class] // CHECK-ERROR: E warn_objc_root_class_missing [-Wobjc-root-class] // CHECK-FATAL: F warn_objc_root_class_missing [-Wobjc-root-class] -// RUN: diagtool show-enabled --no-levels -Wno-everything -Wobjc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-NO-LEVELS %s +// RUN: diagtool show-enabled --no-levels -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-NO-LEVELS %s // // CHECK-NO-LEVELS-NOT: W // CHECK-NO-LEVELS-NOT: E diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index cdfb38fb41..035dd34fb3 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -1,4 +1,4 @@ -RUN: diagtool list-warnings 2>&1 | FileCheck %s +RUN: diagtool list-warnings | FileCheck %s This test serves two purposes: diff --git a/tools/diagtool/diagtool_main.cpp b/tools/diagtool/diagtool_main.cpp index 43616fa9e2..4eef54dbfe 100644 --- a/tools/diagtool/diagtool_main.cpp +++ b/tools/diagtool/diagtool_main.cpp @@ -18,7 +18,7 @@ using namespace diagtool; int main(int argc, char *argv[]) { if (argc > 1) if (DiagTool *tool = diagTools->getTool(argv[1])) - return tool->run(argc - 2, &argv[2], llvm::errs()); + return tool->run(argc - 2, &argv[2], llvm::outs()); llvm::errs() << "usage: diagtool []\n\n"; diagTools->printCommands(llvm::errs()); -- 2.40.0