Fix bugprone-argument-comment clang-tidy issues

Test: m tidy-art
Bug: 213953102
Change-Id: I5c703033db4fefd1cb3f1dd2dc95126930e28d53
diff --git a/build/Android.bp b/build/Android.bp
index 7c6737f..e1ab78b 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -29,6 +29,7 @@
 
 art_clang_tidy_errors = [
     "android-cloexec-open",
+    "bugprone-argument-comment",
     "bugprone-lambda-function-name",
     "bugprone-macro-parentheses",
     "bugprone-unused-raii", // Protect scoped things like MutexLock.
@@ -43,7 +44,6 @@
     // Many files have these warnings. Move them to art_clang_tidy_errors
     // when all files are free of these warnings.
     "android-cloexec-dup",
-    "bugprone-argument-comment",
     "bugprone-unused-return-value",
     "misc-unused-using-decls",
     "modernize-use-nullptr",
diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h
index 4b3d0ab..df21183 100644
--- a/compiler/optimizing/optimizing_unit_test.h
+++ b/compiler/optimizing/optimizing_unit_test.h
@@ -278,7 +278,7 @@
               /* class_linker= */ nullptr,
               graph->GetDexFile(),
               code_item,
-              /* class_def_index= */ DexFile::kDexNoIndex16,
+              /* class_def_idx= */ DexFile::kDexNoIndex16,
               /* method_idx= */ dex::kDexNoIndex,
               /* access_flags= */ 0u,
               /* verified_method= */ nullptr,
diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc
index 6b2198d..d9af774 100644
--- a/dex2oat/linker/oat_writer_test.cc
+++ b/dex2oat/linker/oat_writer_test.cc
@@ -181,7 +181,7 @@
     if (!oat_writer.WriteAndOpenDexFiles(
         vdex_file,
         verify,
-        /*update_input_vdex=*/ false,
+        /*use_existing_vdex=*/ false,
         copy,
         &opened_dex_files_maps,
         &opened_dex_files)) {
diff --git a/libprofile/profile/profile_compilation_info_test.cc b/libprofile/profile/profile_compilation_info_test.cc
index 8c9d0df..39e8b4f 100644
--- a/libprofile/profile/profile_compilation_info_test.cc
+++ b/libprofile/profile/profile_compilation_info_test.cc
@@ -40,17 +40,23 @@
     CommonArtTest::SetUp();
     allocator_.reset(new ArenaAllocator(&pool_));
 
-    dex1 = BuildDex("location1", /*checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 101);
-    dex2 = BuildDex("location2", /*checksum=*/ 2, "LUnique2;", /*num_method_ids=*/ 102);
-    dex3 = BuildDex("location3", /*checksum=*/ 3, "LUnique3;", /*num_method_ids=*/ 103);
-    dex4 = BuildDex("location4", /*checksum=*/ 4, "LUnique4;", /*num_method_ids=*/ 104);
+    dex1 = BuildDex("location1", /*location_checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 101);
+    dex2 = BuildDex("location2", /*location_checksum=*/ 2, "LUnique2;", /*num_method_ids=*/ 102);
+    dex3 = BuildDex("location3", /*location_checksum=*/ 3, "LUnique3;", /*num_method_ids=*/ 103);
+    dex4 = BuildDex("location4", /*location_checksum=*/ 4, "LUnique4;", /*num_method_ids=*/ 104);
 
-    dex1_checksum_missmatch =
-        BuildDex("location1", /*checksum=*/ 12, "LUnique1;", /*num_method_ids=*/ 101);
-    dex1_renamed =
-        BuildDex("location1-renamed", /*checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 101);
-    dex2_renamed =
-        BuildDex("location2-renamed", /*checksum=*/ 2, "LUnique2;", /*num_method_ids=*/ 102);
+    dex1_checksum_missmatch = BuildDex("location1",
+                                       /*location_checksum=*/ 12,
+                                       "LUnique1;",
+                                       /*num_method_ids=*/ 101);
+    dex1_renamed = BuildDex("location1-renamed",
+                            /*location_checksum=*/ 1,
+                            "LUnique1;",
+                            /*num_method_ids=*/ 101);
+    dex2_renamed = BuildDex("location2-renamed",
+                            /*location_checksum=*/ 2,
+                            "LUnique2;",
+                            /*num_method_ids=*/ 102);
   }
 
  protected:
@@ -350,10 +356,16 @@
 TEST_F(ProfileCompilationInfoTest, SaveMaxMethods) {
   ScratchFile profile;
 
-  const DexFile* dex_max1 = BuildDex(
-      "location-max1", /*checksum=*/ 5, "LUniqueMax1;", kMaxMethodIds, kMaxClassIds);
-  const DexFile* dex_max2 = BuildDex(
-      "location-max2", /*checksum=*/ 6, "LUniqueMax2;", kMaxMethodIds, kMaxClassIds);
+  const DexFile* dex_max1 = BuildDex("location-max1",
+                                     /*location_checksum=*/ 5,
+                                     "LUniqueMax1;",
+                                     kMaxMethodIds,
+                                     kMaxClassIds);
+  const DexFile* dex_max2 = BuildDex("location-max2",
+                                     /*location_checksum=*/ 6,
+                                     "LUniqueMax2;",
+                                     kMaxMethodIds,
+                                     kMaxClassIds);
 
 
   ProfileCompilationInfo saved_info;
@@ -733,11 +745,11 @@
   // Save a few methods.
   for (uint16_t i = 0; i < std::numeric_limits<ProfileIndexType>::max(); i++) {
     std::string location = std::to_string(i);
-    const DexFile* dex = BuildDex(location, /*checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
+    const DexFile* dex = BuildDex(location, /*location_checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
     ASSERT_TRUE(AddMethod(&info, dex, /*method_idx=*/ 0));
   }
   // Add an extra dex file.
-  const DexFile* dex = BuildDex("-1", /*checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
+  const DexFile* dex = BuildDex("-1", /*location_checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
   ASSERT_FALSE(AddMethod(&info, dex, /*method_idx=*/ 0));
 }
 
@@ -746,11 +758,11 @@
   // Save a few methods.
   for (uint16_t i = 0; i < std::numeric_limits<ProfileIndexType>::max(); i++) {
     std::string location = std::to_string(i);
-    const DexFile* dex = BuildDex(location, /*checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
+    const DexFile* dex = BuildDex(location, /*location_checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
     ASSERT_TRUE(AddMethod(&info, dex, /*method_idx=*/ 0));
   }
   // Add an extra dex file.
-  const DexFile* dex = BuildDex("-1", /*checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
+  const DexFile* dex = BuildDex("-1", /*location_checksum=*/ 1, "LC;", /*num_method_ids=*/ 1);
   ASSERT_FALSE(AddMethod(&info, dex, /*method_idx=*/ 0));
 }
 
@@ -1167,12 +1179,12 @@
   ScratchFile profile;
 
   const DexFile* dex1_1000 = BuildDex("location1_1000",
-                                      /*checksum=*/ 7,
+                                      /*location_checksum=*/ 7,
                                       "LC1_1000;",
                                       /*num_method_ids=*/ 1u,
                                       /*num_class_ids=*/ 1000u);
   const DexFile* dex2_1000 = BuildDex("location2_1000",
-                                      /*checksum=*/ 8,
+                                      /*location_checksum=*/ 8,
                                       "LC2_1000;",
                                       /*num_method_ids=*/ 1u,
                                       /*num_class_ids=*/ 1000u);
diff --git a/profman/profile_assistant_test.cc b/profman/profile_assistant_test.cc
index d8f0b82..d337419 100644
--- a/profman/profile_assistant_test.cc
+++ b/profman/profile_assistant_test.cc
@@ -50,13 +50,13 @@
   void PostRuntimeCreate() override {
     allocator_.reset(new ArenaAllocator(Runtime::Current()->GetArenaPool()));
 
-    dex1 = BuildDex("location1", /*checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 10001);
-    dex2 = BuildDex("location2", /*checksum=*/ 2, "LUnique2;", /*num_method_ids=*/ 10002);
-    dex3 = BuildDex("location3", /*checksum=*/ 3, "LUnique3;", /*num_method_ids=*/ 10003);
-    dex4 = BuildDex("location4", /*checksum=*/ 4, "LUnique4;", /*num_method_ids=*/ 10004);
+    dex1 = BuildDex("location1", /*location_checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 10001);
+    dex2 = BuildDex("location2", /*location_checksum=*/ 2, "LUnique2;", /*num_method_ids=*/ 10002);
+    dex3 = BuildDex("location3", /*location_checksum=*/ 3, "LUnique3;", /*num_method_ids=*/ 10003);
+    dex4 = BuildDex("location4", /*location_checksum=*/ 4, "LUnique4;", /*num_method_ids=*/ 10004);
 
     dex1_checksum_missmatch =
-        BuildDex("location1", /*checksum=*/ 12, "LUnique1;", /*num_method_ids=*/ 10001);
+        BuildDex("location1", /*location_checksum=*/ 12, "LUnique1;", /*num_method_ids=*/ 10001);
   }
 
  protected:
@@ -442,10 +442,16 @@
                                          const std::vector<const std::string>& extra_args =
                                              std::vector<const std::string>()) {
     uint16_t max_classes = std::max(classes_in_cur_profile, classes_in_ref_profile);
-    const DexFile* dex1_x = BuildDex(
-        "location1_x", /*checksum=*/ 0x101, "LUnique1_x;", /*num_method_ids=*/ 0, max_classes);
-    const DexFile* dex2_x = BuildDex(
-        "location2_x", /*checksum=*/ 0x102, "LUnique2_x;", /*num_method_ids=*/ 0, max_classes);
+    const DexFile* dex1_x = BuildDex("location1_x",
+                                     /*location_checksum=*/ 0x101,
+                                     "LUnique1_x;",
+                                     /*num_method_ids=*/ 0,
+                                     max_classes);
+    const DexFile* dex2_x = BuildDex("location2_x",
+                                     /*location_checksum=*/ 0x102,
+                                     "LUnique2_x;",
+                                     /*num_method_ids=*/ 0,
+                                     max_classes);
 
     ScratchFile profile;
     ScratchFile reference_profile;
@@ -506,15 +512,15 @@
 TEST_F(ProfileAssistantTest, AdviseCompilationEmptyReferencesBecauseOfClasses) {
   const uint16_t kNumberOfClassesToEnableCompilation = 100;
   const DexFile* dex1_100 = BuildDex("location1_100",
-                                     /*checksum=*/ 101,
+                                     /*location_checksum=*/ 101,
                                      "LUnique1_100;",
                                      /*num_method_ids=*/ 0,
-                                     /*num_type_ids=*/ 100);
+                                     /*num_class_ids=*/ 100);
   const DexFile* dex2_100 = BuildDex("location2_100",
-                                     /*checksum=*/ 102,
+                                     /*location_checksum=*/ 102,
                                      "LUnique2_100;",
                                      /*num_method_ids=*/ 0,
-                                     /*num_type_ids=*/ 100);
+                                     /*num_class_ids=*/ 100);
 
   ScratchFile profile1;
   ScratchFile reference_profile;
@@ -1918,15 +1924,15 @@
   const uint16_t kNumberOfClassesInCurProfile = 6110;  // Threshold is 2%.
 
   const DexFile* dex1_7000 = BuildDex("location1_7000",
-                                      /*checksum=*/ 7001,
+                                      /*location_checksum=*/ 7001,
                                       "LUnique1_7000;",
                                       /*num_method_ids=*/ 0,
-                                      /*num_type_ids=*/ 7000);
+                                      /*num_class_ids=*/ 7000);
   const DexFile* dex2_7000 = BuildDex("location2_7000",
-                                      /*checksum=*/ 7002,
+                                      /*location_checksum=*/ 7002,
                                       "LUnique2_7000;",
                                       /*num_method_ids=*/ 0,
-                                      /*num_type_ids=*/ 7000);
+                                      /*num_class_ids=*/ 7000);
 
   ScratchFile profile;
   ScratchFile reference_profile;
diff --git a/runtime/class_loader_utils.h b/runtime/class_loader_utils.h
index 934c92b..c777370 100644
--- a/runtime/class_loader_utils.h
+++ b/runtime/class_loader_utils.h
@@ -177,7 +177,7 @@
   VisitClassLoaderDexFiles<decltype(helper), void*>(soa,
                                                     class_loader,
                                                     helper,
-                                                    /* default= */ nullptr);
+                                                    /* defaultReturn= */ nullptr);
 }
 
 }  // namespace art
diff --git a/runtime/gc/collector/immune_spaces_test.cc b/runtime/gc/collector/immune_spaces_test.cc
index a0ea60d..3d27a93 100644
--- a/runtime/gc/collector/immune_spaces_test.cc
+++ b/runtime/gc/collector/immune_spaces_test.cc
@@ -46,7 +46,7 @@
                  MemMap&& oat_map)
       : ImageSpace("FakeImageSpace",
                    /*image_location=*/"",
-                   /*profile_file=*/{},
+                   /*profile_files=*/{},
                    std::move(map),
                    std::move(live_bitmap),
                    map.End()),
diff --git a/runtime/metrics/statsd.cc b/runtime/metrics/statsd.cc
index 560e7da..78c3622 100644
--- a/runtime/metrics/statsd.cc
+++ b/runtime/metrics/statsd.cc
@@ -250,8 +250,8 @@
           EncodeCompileFilter(session_data_.compiler_filter),
           EncodeCompilationReason(session_data_.compilation_reason),
           current_timestamp_,
-          /*thread_type=*/0,  // TODO: collect and report thread type (0 means UNKNOWN, but that
-                              // constant is not present in all branches)
+          0,  // TODO: collect and report thread type (0 means UNKNOWN, but that
+              // constant is not present in all branches)
           datum_id.value(),
           static_cast<int64_t>(value),
           statsd::ART_DATUM_REPORTED__DEX_METADATA_TYPE__ART_DEX_METADATA_TYPE_UNKNOWN,
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 63778c7..30ca7b5 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -2252,7 +2252,7 @@
     return OatFile::OatClass(oat_file_,
                              ClassStatus::kNotReady,
                              /* type= */ OatClassType::kNoneCompiled,
-                             /* bitmap_size= */ 0u,
+                             /* num_methods= */ 0u,
                              /* bitmap_pointer= */ nullptr,
                              /* methods_pointer= */ nullptr);
   }
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index c1b1acb..fdb4217 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -270,7 +270,7 @@
       return OatClass(/* oat_file= */ nullptr,
                       ClassStatus::kErrorUnresolved,
                       OatClassType::kNoneCompiled,
-                      /* bitmap_size= */ 0,
+                      /* num_methods= */ 0,
                       /* bitmap_pointer= */ nullptr,
                       /* methods_pointer= */ nullptr);
     }
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 1ba0cbb..cf0155f 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -750,7 +750,7 @@
   // Only verify the primary boot image.
   cached_is_boot_image_usable_ = gc::space::ImageSpace::VerifyBootImages(
       ArrayRef<const std::string>(runtime_options_->image_locations)
-          .SubArray(/*pos=*/0u, /*size=*/1u),
+          .SubArray(/*pos=*/0u, /*length=*/1u),
       ArrayRef<const std::string>(runtime_options_->boot_class_path_locations),
       ArrayRef<const std::string>(runtime_options_->boot_class_path),
       runtime_options_->boot_class_path_fds != nullptr ?
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 1e58216..ba3af80 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1129,8 +1129,8 @@
       std::vector<std::string> jars = android::base::Split(system_server_classpath, ":");
       app_info_.RegisterAppInfo("android",
                                 jars,
-                                /*cur_profile_path=*/ "",
-                                /*ref_profile_path=*/ "",
+                                /*profile_output_filename=*/ "",
+                                /*ref_profile_filename=*/ "",
                                 AppInfo::CodeType::kPrimaryApk);
     }