Skip to content

Commit 2e298a6

Browse files
committed
[Driver] Fix a shadowing warning. NFC
Found by the following buildbot: http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/30084
1 parent a0408ab commit 2e298a6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/unittests/Driver/SanitizerArgsTest.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,28 @@ class SanitizerArgsTest : public ::testing::Test {
5050
protected:
5151
const Command &emulateSingleCompilation(std::vector<std::string> ExtraArgs,
5252
std::vector<std::string> ExtraFiles) {
53-
assert(!Driver && "Running twice is not allowed");
53+
assert(!DriverInstance && "Running twice is not allowed");
5454

5555
llvm::IntrusiveRefCntPtr<DiagnosticOptions> Opts = new DiagnosticOptions;
5656
DiagnosticsEngine Diags(
5757
new DiagnosticIDs, Opts,
5858
new TextDiagnosticPrinter(llvm::errs(), Opts.get()));
59-
Driver.emplace(ClangBinary, "x86_64-unknown-linux-gnu", Diags,
60-
prepareFS(ExtraFiles));
59+
DriverInstance.emplace(ClangBinary, "x86_64-unknown-linux-gnu", Diags,
60+
prepareFS(ExtraFiles));
6161

6262
std::vector<const char *> Args = {ClangBinary};
6363
for (const auto &A : ExtraArgs)
6464
Args.push_back(A.c_str());
6565
Args.push_back("-c");
6666
Args.push_back(InputFile);
6767

68-
Compilation.reset(Driver->BuildCompilation(Args));
68+
CompilationJob.reset(DriverInstance->BuildCompilation(Args));
6969

7070
if (Diags.hasErrorOccurred())
7171
ADD_FAILURE() << "Error occurred while parsing compilation arguments. "
7272
"See stderr for details.";
7373

74-
const auto &Commands = Compilation->getJobs().getJobs();
74+
const auto &Commands = CompilationJob->getJobs().getJobs();
7575
assert(Commands.size() == 1);
7676
return *Commands.front();
7777
}
@@ -88,8 +88,8 @@ class SanitizerArgsTest : public ::testing::Test {
8888
return FS;
8989
}
9090

91-
llvm::Optional<Driver> Driver;
92-
std::unique_ptr<driver::Compilation> Compilation;
91+
llvm::Optional<Driver> DriverInstance;
92+
std::unique_ptr<driver::Compilation> CompilationJob;
9393
};
9494

9595
TEST_F(SanitizerArgsTest, Blacklists) {

0 commit comments

Comments
 (0)