@@ -145,7 +145,7 @@ TEST_F(OverlayCDBTest, Adjustments) {
145145 return Ret;
146146 });
147147 // Command from underlying gets adjusted.
148- auto Cmd = CDB.getCompileCommand (testPath (" foo.cc" )). getValue ( );
148+ auto Cmd = * CDB.getCompileCommand (testPath (" foo.cc" ));
149149 EXPECT_THAT (Cmd.CommandLine , ElementsAre (" clang" , " -DA=1" , testPath (" foo.cc" ),
150150 " -DAdjust_foo.cc" ));
151151
@@ -154,7 +154,7 @@ TEST_F(OverlayCDBTest, Adjustments) {
154154 BarCommand.Filename = testPath (" bar.cc" );
155155 BarCommand.CommandLine = {" clang++" , " -DB=1" , testPath (" bar.cc" )};
156156 CDB.setCompileCommand (testPath (" bar.cc" ), BarCommand);
157- Cmd = CDB.getCompileCommand (testPath (" bar.cc" )). getValue ( );
157+ Cmd = * CDB.getCompileCommand (testPath (" bar.cc" ));
158158 EXPECT_THAT (
159159 Cmd.CommandLine ,
160160 ElementsAre (" clang++" , " -DB=1" , testPath (" bar.cc" ), " -DAdjust_bar.cc" ));
@@ -253,7 +253,7 @@ TEST(GlobalCompilationDatabaseTest, DiscoveryWithNestedCDBs) {
253253
254254 // Does not use the root CDB, so no broadcast.
255255 auto Cmd = DB.getCompileCommand (testPath (" build/../a.cc" ));
256- ASSERT_TRUE (Cmd. hasValue () );
256+ ASSERT_TRUE (Cmd);
257257 EXPECT_THAT (Cmd->CommandLine , Contains (" -DFOO" )) << " a.cc uses foo/ CDB" ;
258258 ASSERT_TRUE (DB.blockUntilIdle (timeoutSeconds (10 )));
259259 EXPECT_THAT (DiscoveredFiles, IsEmpty ()) << " Root CDB not discovered yet" ;
0 commit comments