aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/LexerTest.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-04-04 10:11:14 -0700
committerGitHub <noreply@github.com>2025-04-04 10:11:14 -0700
commit1688c3062a56b4fca1f8ad28f2865df0ed8ca940 (patch)
tree54a166397652bb5c96fdd30caabf46765eb06f6e /clang/unittests/Lex/LexerTest.cpp
parent90cf2e31abdee050b5811155c86605935046b07e (diff)
downloadllvm-1688c3062a56b4fca1f8ad28f2865df0ed8ca940.zip
llvm-1688c3062a56b4fca1f8ad28f2865df0ed8ca940.tar.gz
llvm-1688c3062a56b4fca1f8ad28f2865df0ed8ca940.tar.bz2
[clang] Do not share ownership of `PreprocessorOptions` (#133467)
This PR makes it so that `CompilerInvocation` is the sole owner of the `PreprocessorOptions` instance.
Diffstat (limited to 'clang/unittests/Lex/LexerTest.cpp')
-rw-r--r--clang/unittests/Lex/LexerTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index 96a0717..3bbc571 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -59,9 +59,9 @@ protected:
HeaderSearchOptions HSOpts;
HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts, Target.get());
+ PreprocessorOptions PPOpts;
std::unique_ptr<Preprocessor> PP = std::make_unique<Preprocessor>(
- std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
- HeaderInfo, ModLoader,
+ PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/nullptr,
/*OwnsHeaderSearch =*/false);
PP->Initialize(*Target);