r321639 - [Driver] Fix unused variables and test-writing-into-workdir after r321621
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 2 01:35:10 PST 2018
Author: sammccall
Date: Tue Jan 2 01:35:10 2018
New Revision: 321639
URL: http://llvm.org/viewvc/llvm-project?rev=321639&view=rev
Log:
[Driver] Fix unused variables and test-writing-into-workdir after r321621
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/config-file.c
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=321639&r1=321638&r2=321639&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Jan 2 01:35:10 2018
@@ -682,7 +682,7 @@ bool Driver::loadConfigFile() {
CfgDir.append(
CLOptions->getLastArgValue(options::OPT_config_system_dir_EQ));
if (!CfgDir.empty()) {
- if (std::error_code EC = llvm::sys::fs::make_absolute(CfgDir))
+ if (llvm::sys::fs::make_absolute(CfgDir).value() != 0)
SystemConfigDir.clear();
else
SystemConfigDir = std::string(CfgDir.begin(), CfgDir.end());
@@ -693,7 +693,7 @@ bool Driver::loadConfigFile() {
CfgDir.append(
CLOptions->getLastArgValue(options::OPT_config_user_dir_EQ));
if (!CfgDir.empty()) {
- if (std::error_code EC = llvm::sys::fs::make_absolute(CfgDir))
+ if (llvm::sys::fs::make_absolute(CfgDir).value() != 0)
UserConfigDir.clear();
else
UserConfigDir = std::string(CfgDir.begin(), CfgDir.end());
Modified: cfe/trunk/test/Driver/config-file.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/config-file.c?rev=321639&r1=321638&r2=321639&view=diff
==============================================================================
--- cfe/trunk/test/Driver/config-file.c (original)
+++ cfe/trunk/test/Driver/config-file.c Tue Jan 2 01:35:10 2018
@@ -1,6 +1,6 @@
//--- Config file search directories
//
-// RUN: %clang --config-system-dir=%S/Inputs/config --config-user-dir=%S/Inputs/config2 -v 2>&1 | FileCheck %s -check-prefix CHECK-DIRS
+// RUN: %clang --config-system-dir=%S/Inputs/config --config-user-dir=%S/Inputs/config2 -o /dev/null -v 2>&1 | FileCheck %s -check-prefix CHECK-DIRS
// CHECK-DIRS: System configuration file directory: {{.*}}/Inputs/config
// CHECK-DIRS: User configuration file directory: {{.*}}/Inputs/config2
@@ -15,7 +15,7 @@
//--- Config file (full path) in output of -v
//
-// RUN: %clang --config %S/Inputs/config-1.cfg -c %s -v 2>&1 | FileCheck %s -check-prefix CHECK-V
+// RUN: %clang --config %S/Inputs/config-1.cfg -c %s -o /dev/null -v 2>&1 | FileCheck %s -check-prefix CHECK-V
// CHECK-V: Configuration file: {{.*}}Inputs{{.}}config-1.cfg
// CHECK-V: -Werror
// CHECK-V: -std=c99
@@ -31,7 +31,7 @@
//--- Config file in output of -v
//
-// RUN: %clang --config-system-dir=%S/Inputs --config-user-dir= --config config-1.cfg -c %s -v 2>&1 | FileCheck %s -check-prefix CHECK-V2
+// RUN: %clang --config-system-dir=%S/Inputs --config-user-dir= --config config-1.cfg -c %s -o /dev/null -v 2>&1 | FileCheck %s -check-prefix CHECK-V2
// CHECK-V2: Configuration file: {{.*}}Inputs{{.}}config-1.cfg
// CHECK-V2: -Werror
// CHECK-V2: -std=c99
@@ -61,12 +61,12 @@
//--- Unused options in config file do not produce warnings
//
-// RUN: %clang --config %S/Inputs/config-4.cfg -c %s -v 2>&1 | FileCheck %s -check-prefix CHECK-UNUSED
+// RUN: %clang --config %S/Inputs/config-4.cfg -c %s -o /dev/null -v 2>&1 | FileCheck %s -check-prefix CHECK-UNUSED
// CHECK-UNUSED-NOT: argument unused during compilation:
//--- User directory is searched first.
//
-// RUN: %clang --config-system-dir=%S/Inputs/config --config-user-dir=%S/Inputs/config2 --config config-4 -c %s -v 2>&1 | FileCheck %s -check-prefix CHECK-PRECEDENCE
+// RUN: %clang --config-system-dir=%S/Inputs/config --config-user-dir=%S/Inputs/config2 --config config-4 -c %s -o /dev/null -v 2>&1 | FileCheck %s -check-prefix CHECK-PRECEDENCE
// CHECK-PRECEDENCE: Configuration file: {{.*}}Inputs{{.}}config2{{.}}config-4.cfg
// CHECK-PRECEDENCE: -Wall
More information about the cfe-commits
mailing list