From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- clang/lib/Testing/TestAST.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Testing/TestAST.cpp') diff --git a/clang/lib/Testing/TestAST.cpp b/clang/lib/Testing/TestAST.cpp index 5817230f4b09..8c79fcd7d636 100644 --- a/clang/lib/Testing/TestAST.cpp +++ b/clang/lib/Testing/TestAST.cpp @@ -114,7 +114,8 @@ TestAST::TestAST(const TestInputs &In) { // Running the FrontendAction creates the other components: SourceManager, // Preprocessor, ASTContext, Sema. Preprocessor needs TargetInfo to be set. EXPECT_TRUE(Clang->createTarget()); - Action = std::make_unique(); + Action = + In.MakeAction ? In.MakeAction() : std::make_unique(); const FrontendInputFile &Main = Clang->getFrontendOpts().Inputs.front(); if (!Action->BeginSourceFile(*Clang, Main)) { ADD_FAILURE() << "Failed to BeginSourceFile()"; -- cgit v1.2.3