From 8e0c9bb91f484b7d2fa86c01919d96a41a7071d7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 31 Aug 2023 14:22:23 -0700 Subject: [clang] NFCI: Change returned AnalyzerOptions smart pointer to reference --- clang/unittests/Frontend/CompilerInvocationTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp') diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp index 673b34d..36a2eda 100644 --- a/clang/unittests/Frontend/CompilerInvocationTest.cpp +++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp @@ -102,23 +102,23 @@ TEST(ContainsN, Two) { TEST(CompilerInvocationTest, DeepCopyConstructor) { CompilerInvocation A; - A.getAnalyzerOpts()->Config["Key"] = "Old"; + A.getAnalyzerOpts().Config["Key"] = "Old"; CompilerInvocation B(A); - B.getAnalyzerOpts()->Config["Key"] = "New"; + B.getAnalyzerOpts().Config["Key"] = "New"; - ASSERT_EQ(A.getAnalyzerOpts()->Config["Key"], "Old"); + ASSERT_EQ(A.getAnalyzerOpts().Config["Key"], "Old"); } TEST(CompilerInvocationTest, DeepCopyAssignment) { CompilerInvocation A; - A.getAnalyzerOpts()->Config["Key"] = "Old"; + A.getAnalyzerOpts().Config["Key"] = "Old"; CompilerInvocation B; B = A; - B.getAnalyzerOpts()->Config["Key"] = "New"; + B.getAnalyzerOpts().Config["Key"] = "New"; - ASSERT_EQ(A.getAnalyzerOpts()->Config["Key"], "Old"); + ASSERT_EQ(A.getAnalyzerOpts().Config["Key"], "Old"); } // Boolean option with a keypath that defaults to true. @@ -982,8 +982,8 @@ TEST_F(CommandLineTest, RoundTrip) { Contains(std::make_pair(std::string("XY=AB"), false))); ASSERT_EQ(Invocation.getPreprocessorOpts().ImplicitPCHInclude, "a.pch"); - ASSERT_EQ(Invocation.getAnalyzerOpts()->Config["ctu-import-threshold"], "42"); - ASSERT_TRUE(Invocation.getAnalyzerOpts()->UnoptimizedCFG); + ASSERT_EQ(Invocation.getAnalyzerOpts().Config["ctu-import-threshold"], "42"); + ASSERT_TRUE(Invocation.getAnalyzerOpts().UnoptimizedCFG); ASSERT_TRUE(Invocation.getMigratorOpts().NoNSAllocReallocError); -- cgit v1.1