diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-08-31 14:22:23 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-09-05 13:23:53 -0700 |
commit | 8e0c9bb91f484b7d2fa86c01919d96a41a7071d7 (patch) | |
tree | 20ce486d07cf609dccfea8df2b2be6a5be31243b /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 5746002ebb9c3d02be408edf13c2edc39aecf591 (diff) | |
download | llvm-8e0c9bb91f484b7d2fa86c01919d96a41a7071d7.zip llvm-8e0c9bb91f484b7d2fa86c01919d96a41a7071d7.tar.gz llvm-8e0c9bb91f484b7d2fa86c01919d96a41a7071d7.tar.bz2 |
[clang] NFCI: Change returned AnalyzerOptions smart pointer to reference
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
-rw-r--r-- | clang/unittests/Frontend/CompilerInvocationTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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); |