From f44552ab387b9087fb815251064782f8fb60e643 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Fri, 6 May 2022 17:05:47 +0200 Subject: [PATCH] [Frontend] Fix broken createInvocation test due to bad merge --- clang/unittests/Frontend/UtilsTest.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clang/unittests/Frontend/UtilsTest.cpp b/clang/unittests/Frontend/UtilsTest.cpp index cb2b6e0..4c4b7b9 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 CI = createInvocationFromCommandLine( - Args, CommandLineDiagsEngine, FS, false, nullptr); + CreateInvocationOptions CIOpts; + CIOpts.Diags = CommandLineDiagsEngine; + CIOpts.VFS = FS; + std::unique_ptr 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, ""); -- 2.7.4