[clang] f44552a - [Frontend] Fix broken createInvocation test due to bad merge
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri May 6 08:06:19 PDT 2022
Author: Sam McCall
Date: 2022-05-06T17:06:13+02:00
New Revision: f44552ab387b9087fb815251064782f8fb60e643
URL: https://github.com/llvm/llvm-project/commit/f44552ab387b9087fb815251064782f8fb60e643
DIFF: https://github.com/llvm/llvm-project/commit/f44552ab387b9087fb815251064782f8fb60e643.diff
LOG: [Frontend] Fix broken createInvocation test due to bad merge
Added:
Modified:
clang/unittests/Frontend/UtilsTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Frontend/UtilsTest.cpp b/clang/unittests/Frontend/UtilsTest.cpp
index cb2b6e082fdb..4c4b7b969107 100644
--- a/clang/unittests/Frontend/UtilsTest.cpp
+++ b/clang/unittests/Frontend/UtilsTest.cpp
@@ -49,14 +49,16 @@ TEST(BuildCompilerInvocationTest, ProbePrecompiled) {
clang::CompilerInstance::createDiagnostics(new DiagnosticOptions, &D,
false);
// Default: ProbePrecompiled is true.
- std::unique_ptr<CompilerInvocation> CI = createInvocationFromCommandLine(
- Args, CommandLineDiagsEngine, FS, false, nullptr);
+ CreateInvocationOptions CIOpts;
+ CIOpts.Diags = CommandLineDiagsEngine;
+ CIOpts.VFS = FS;
+ std::unique_ptr<CompilerInvocation> CI = createInvocation(Args, CIOpts);
ASSERT_TRUE(CI);
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre());
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "foo.h.pch");
- CI = createInvocationFromCommandLine(Args, CommandLineDiagsEngine, FS, false,
- nullptr, /*ProbePrecompiled=*/false);
+ CIOpts.ProbePrecompiled = false;
+ CI = createInvocation(Args, CIOpts);
ASSERT_TRUE(CI);
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre("foo.h"));
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "");
More information about the cfe-commits
mailing list