[Frontend] Fix broken createInvocation test due to bad merge

This commit is contained in:
Sam McCall 2022-05-06 17:05:47 +02:00
parent 687ccba198
commit f44552ab38
1 changed files with 6 additions and 4 deletions

View File

@ -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, "");