forked from OSchip/llvm-project
[Frontend] Fix broken createInvocation test due to bad merge
This commit is contained in:
parent
687ccba198
commit
f44552ab38
|
@ -49,14 +49,16 @@ TEST(BuildCompilerInvocationTest, ProbePrecompiled) {
|
||||||
clang::CompilerInstance::createDiagnostics(new DiagnosticOptions, &D,
|
clang::CompilerInstance::createDiagnostics(new DiagnosticOptions, &D,
|
||||||
false);
|
false);
|
||||||
// Default: ProbePrecompiled is true.
|
// Default: ProbePrecompiled is true.
|
||||||
std::unique_ptr<CompilerInvocation> CI = createInvocationFromCommandLine(
|
CreateInvocationOptions CIOpts;
|
||||||
Args, CommandLineDiagsEngine, FS, false, nullptr);
|
CIOpts.Diags = CommandLineDiagsEngine;
|
||||||
|
CIOpts.VFS = FS;
|
||||||
|
std::unique_ptr<CompilerInvocation> CI = createInvocation(Args, CIOpts);
|
||||||
ASSERT_TRUE(CI);
|
ASSERT_TRUE(CI);
|
||||||
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre());
|
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre());
|
||||||
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "foo.h.pch");
|
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "foo.h.pch");
|
||||||
|
|
||||||
CI = createInvocationFromCommandLine(Args, CommandLineDiagsEngine, FS, false,
|
CIOpts.ProbePrecompiled = false;
|
||||||
nullptr, /*ProbePrecompiled=*/false);
|
CI = createInvocation(Args, CIOpts);
|
||||||
ASSERT_TRUE(CI);
|
ASSERT_TRUE(CI);
|
||||||
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre("foo.h"));
|
EXPECT_THAT(CI->getPreprocessorOpts().Includes, ElementsAre("foo.h"));
|
||||||
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "");
|
EXPECT_EQ(CI->getPreprocessorOpts().ImplicitPCHInclude, "");
|
||||||
|
|
Loading…
Reference in New Issue