cpplint: Remove many unnecessary NOLINT
Now that we updated to upstream cpplint, a lot of these NOLINTs are no
longer necessary.
Bug: 68951293
Change-Id: If8ed5ffe89727f313f907a214b6d8fd2a2eddbad
diff --git a/CPPLINT.cfg b/CPPLINT.cfg
index bf0ad58..8328842 100644
--- a/CPPLINT.cfg
+++ b/CPPLINT.cfg
@@ -25,6 +25,7 @@
# Ignore the following categories of errors, as specified by the filter:
# (the filter settings are concatenated together)
+filter=-build/c++11
filter=-build/include
filter=-readability/function,-readability/streams,-readability/todo
filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn
diff --git a/cmdline/cmdline_parser.h b/cmdline/cmdline_parser.h
index fef39ad..82c04e7 100644
--- a/cmdline/cmdline_parser.h
+++ b/cmdline/cmdline_parser.h
@@ -340,7 +340,7 @@
typename std::enable_if<std::is_same<TArg, Unit>::value>::type
InitializeTypedBuilder(ArgumentBuilder<TArg>* arg_builder) {
// Every Unit argument implicitly maps to a runtime value of Unit{}
- std::vector<Unit> values(names_.size(), Unit{}); // NOLINT [whitespace/braces] [5]
+ std::vector<Unit> values(names_.size(), Unit{});
arg_builder->SetValuesInternal(std::move(values));
}
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 34aea55..1536339 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -190,7 +190,7 @@
#define EXPECT_SINGLE_PARSE_VALUE(expected, argv, key) \
_EXPECT_SINGLE_PARSE_EXISTS(argv, key); \
EXPECT_KEY_VALUE(args, key, expected); \
- } while (false) // NOLINT [readability/namespace] [5]
+ } while (false)
#define EXPECT_SINGLE_PARSE_VALUE_STR(expected, argv, key) \
EXPECT_SINGLE_PARSE_VALUE(std::string(expected), argv, key)
@@ -318,7 +318,7 @@
* Test success
*/
{
- XGcOption option_all_true{}; // NOLINT [readability/braces] [4]
+ XGcOption option_all_true{};
option_all_true.collector_type_ = gc::CollectorType::kCollectorTypeCMS;
option_all_true.verify_pre_gc_heap_ = true;
option_all_true.verify_pre_sweeping_heap_ = true;
@@ -335,7 +335,7 @@
EXPECT_SINGLE_PARSE_VALUE(option_all_true, xgc_args_all_true, M::GcOption);
- XGcOption option_all_false{}; // NOLINT [readability/braces] [4]
+ XGcOption option_all_false{};
option_all_false.collector_type_ = gc::CollectorType::kCollectorTypeMS;
option_all_false.verify_pre_gc_heap_ = false;
option_all_false.verify_pre_sweeping_heap_ = false;
@@ -350,7 +350,7 @@
EXPECT_SINGLE_PARSE_VALUE(option_all_false, xgc_args_all_false, M::GcOption);
- XGcOption option_all_default{}; // NOLINT [readability/braces] [4]
+ XGcOption option_all_default{};
const char* xgc_args_blank = "-Xgc:";
EXPECT_SINGLE_PARSE_VALUE(option_all_default, xgc_args_blank, M::GcOption);
@@ -566,10 +566,10 @@
auto&& map = parser_->ReleaseArgumentsMap();
EXPECT_EQ(5u, map.Size());
- EXPECT_KEY_VALUE(map, M::Help, Unit{}); // NOLINT [whitespace/braces] [5]
+ EXPECT_KEY_VALUE(map, M::Help, Unit{});
EXPECT_KEY_VALUE(map, M::ForegroundHeapGrowthMultiplier, 0.5);
EXPECT_KEY_VALUE(map, M::Dex2Oat, false);
- EXPECT_KEY_VALUE(map, M::MethodTrace, Unit{}); // NOLINT [whitespace/braces] [5]
+ EXPECT_KEY_VALUE(map, M::MethodTrace, Unit{});
EXPECT_KEY_VALUE(map, M::LargeObjectSpace, gc::space::LargeObjectSpaceType::kMap);
} // TEST_F
} // namespace art
diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h
index 87bf1c4..37bdcdc 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -57,7 +57,7 @@
struct CmdlineType<Unit> : CmdlineTypeParser<Unit> {
Result Parse(const std::string& args) {
if (args == "") {
- return Result::Success(Unit{}); // NOLINT [whitespace/braces] [5]
+ return Result::Success(Unit{});
}
return Result::Failure("Unexpected extra characters " + args);
}
@@ -532,7 +532,7 @@
template <>
struct CmdlineType<XGcOption> : CmdlineTypeParser<XGcOption> {
Result Parse(const std::string& option) { // -Xgc: already stripped
- XGcOption xgc{}; // NOLINT [readability/braces] [4]
+ XGcOption xgc{};
std::vector<std::string> gc_options;
Split(option, ',', &gc_options);
diff --git a/compiler/debug/dwarf/dwarf_test.cc b/compiler/debug/dwarf/dwarf_test.cc
index 866bf43..933034f 100644
--- a/compiler/debug/dwarf/dwarf_test.cc
+++ b/compiler/debug/dwarf/dwarf_test.cc
@@ -125,7 +125,7 @@
WriteCIE(is64bit, Reg(is64bit ? 16 : 8),
initial_opcodes, kCFIFormat, &debug_frame_data_);
std::vector<uintptr_t> debug_frame_patches;
- std::vector<uintptr_t> expected_patches { 28 }; // NOLINT
+ std::vector<uintptr_t> expected_patches = { 28 };
WriteFDE(is64bit, 0, 0, 0x01000000, 0x01000000, ArrayRef<const uint8_t>(*opcodes.data()),
kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches);
@@ -140,7 +140,7 @@
initial_opcodes, kCFIFormat, &debug_frame_data_);
DebugFrameOpCodeWriter<> opcodes;
std::vector<uintptr_t> debug_frame_patches;
- std::vector<uintptr_t> expected_patches { 32 }; // NOLINT
+ std::vector<uintptr_t> expected_patches = { 32 };
WriteFDE(is64bit, 0, 0, 0x0100000000000000, 0x0200000000000000,
ArrayRef<const uint8_t>(*opcodes.data()),
kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches);
@@ -237,7 +237,7 @@
DW_CHECK_NEXT("1\t0\t1000\t2000\tfile.c");
std::vector<uintptr_t> debug_line_patches;
- std::vector<uintptr_t> expected_patches { 87 }; // NOLINT
+ std::vector<uintptr_t> expected_patches = { 87 };
WriteDebugLineTable(include_directories, files, opcodes,
0, &debug_line_data_, &debug_line_patches);
@@ -275,7 +275,7 @@
EXPECT_LT(opcodes.data()->size(), num_rows * 3);
std::vector<std::string> directories;
- std::vector<FileEntry> files { { "file.c", 0, 1000, 2000 } }; // NOLINT
+ std::vector<FileEntry> files = { { "file.c", 0, 1000, 2000 } };
std::vector<uintptr_t> debug_line_patches;
WriteDebugLineTable(directories, files, opcodes,
0, &debug_line_data_, &debug_line_patches);
@@ -333,7 +333,7 @@
DW_CHECK("3 DW_TAG_compile_unit [no children]");
std::vector<uintptr_t> debug_info_patches;
- std::vector<uintptr_t> expected_patches { 16, 20, 29, 33, 42, 46 }; // NOLINT
+ std::vector<uintptr_t> expected_patches = { 16, 20, 29, 33, 42, 46 };
dwarf::WriteDebugInfoCU(0 /* debug_abbrev_offset */, info,
0, &debug_info_data_, &debug_info_patches);
diff --git a/compiler/driver/compiler_options_map-storage.h b/compiler/driver/compiler_options_map-storage.h
index 756598d..01f32e0 100644
--- a/compiler/driver/compiler_options_map-storage.h
+++ b/compiler/driver/compiler_options_map-storage.h
@@ -36,7 +36,7 @@
#define COMPILER_OPTIONS_KEY(Type, Name, ...) \
template <typename Base, template <typename TV> class KeyType> \
- const KeyType<Type> CompilerOptionsMap<Base, KeyType>::Name {__VA_ARGS__}; // NOLINT [readability/braces] [4]
+ const KeyType<Type> CompilerOptionsMap<Base, KeyType>::Name {__VA_ARGS__};
#include <driver/compiler_options_map.def>
template struct CompilerOptionsMap<COMPILER_OPTIONS_MAP_TYPE, COMPILER_OPTIONS_MAP_KEY_TYPE>;
diff --git a/compiler/optimizing/induction_var_analysis_test.cc b/compiler/optimizing/induction_var_analysis_test.cc
index f87b46d..4c11ad4 100644
--- a/compiler/optimizing/induction_var_analysis_test.cc
+++ b/compiler/optimizing/induction_var_analysis_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <regex> // NOLINT [build/c++11] [5]
+#include <regex>
#include "base/arena_allocator.h"
#include "builder.h"
diff --git a/compiler/utils/intrusive_forward_list_test.cc b/compiler/utils/intrusive_forward_list_test.cc
index 939676c..e97c304 100644
--- a/compiler/utils/intrusive_forward_list_test.cc
+++ b/compiler/utils/intrusive_forward_list_test.cc
@@ -574,11 +574,11 @@
ref.remove(4);
ifl.remove(4);
ASSERT_LISTS_EQUAL(ref, ifl);
- auto odd = [](ValueType value) { return (value.value & 1) != 0; }; // NOLINT(readability/braces)
+ auto odd = [](ValueType value) { return (value.value & 1) != 0; };
ref.remove_if(odd);
ifl.remove_if(odd);
ASSERT_LISTS_EQUAL(ref, ifl);
- auto all = [](ValueType value ATTRIBUTE_UNUSED) { return true; }; // NOLINT(readability/braces)
+ auto all = [](ValueType value ATTRIBUTE_UNUSED) { return true; };
ref.remove_if(all);
ifl.remove_if(all);
ASSERT_LISTS_EQUAL(ref, ifl);
@@ -721,7 +721,7 @@
ListType ifl(storage.begin(), storage.end());
ASSERT_LISTS_EQUAL(ref, ifl);
- auto add1 = [](const ValueType& value) { return value.value + 1; }; // NOLINT [readability/braces]
+ auto add1 = [](const ValueType& value) { return value.value + 1; };
std::transform(ref.begin(), ref.end(), ref.begin(), add1);
std::transform(ifl.begin(), ifl.end(), ifl.begin(), add1);
ASSERT_LISTS_EQUAL(ref, ifl);
diff --git a/compiler/utils/swap_space.h b/compiler/utils/swap_space.h
index 08e243b..2280f8b 100644
--- a/compiler/utils/swap_space.h
+++ b/compiler/utils/swap_space.h
@@ -124,7 +124,7 @@
explicit SwapAllocator(SwapSpace* swap_space) : swap_space_(swap_space) {}
template <typename U>
- SwapAllocator(const SwapAllocator<U>& other) // NOLINT, implicit
+ SwapAllocator(const SwapAllocator<U>& other)
: swap_space_(other.swap_space_) {}
SwapAllocator(const SwapAllocator& other) = default;
@@ -160,7 +160,7 @@
explicit SwapAllocator(SwapSpace* swap_space) : swap_space_(swap_space) {}
template <typename U>
- SwapAllocator(const SwapAllocator<U>& other) // NOLINT, implicit
+ SwapAllocator(const SwapAllocator<U>& other)
: swap_space_(other.swap_space_) {}
SwapAllocator(const SwapAllocator& other) = default;
diff --git a/compiler/utils/x86/assembler_x86_test.cc b/compiler/utils/x86/assembler_x86_test.cc
index e232add..36c5c3c 100644
--- a/compiler/utils/x86/assembler_x86_test.cc
+++ b/compiler/utils/x86/assembler_x86_test.cc
@@ -90,7 +90,7 @@
}
if (registers_.size() == 0) {
registers_.insert(end(registers_),
- { // NOLINT(whitespace/braces)
+ {
new x86::Register(x86::EAX),
new x86::Register(x86::EBX),
new x86::Register(x86::ECX),
@@ -104,7 +104,7 @@
if (fp_registers_.size() == 0) {
fp_registers_.insert(end(fp_registers_),
- { // NOLINT(whitespace/braces)
+ {
new x86::XmmRegister(x86::XMM0),
new x86::XmmRegister(x86::XMM1),
new x86::XmmRegister(x86::XMM2),
diff --git a/dex2oat/dex2oat_image_test.cc b/dex2oat/dex2oat_image_test.cc
index 7086655..a02fbf8 100644
--- a/dex2oat/dex2oat_image_test.cc
+++ b/dex2oat/dex2oat_image_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <regex> // NOLINT [build/c++11] [5]
+#include <regex>
#include <sstream>
#include <string>
#include <vector>
diff --git a/dex2oat/dex2oat_options.cc b/dex2oat/dex2oat_options.cc
index 2cf0701..7f177b9 100644
--- a/dex2oat/dex2oat_options.cc
+++ b/dex2oat/dex2oat_options.cc
@@ -43,7 +43,7 @@
// Specify storage for the Dex2oatOptions keys.
#define DEX2OAT_OPTIONS_KEY(Type, Name, ...) \
- const Dex2oatArgumentMap::Key<Type> Dex2oatArgumentMap::Name {__VA_ARGS__}; // NOLINT [readability/braces] [4]
+ const Dex2oatArgumentMap::Key<Type> Dex2oatArgumentMap::Name {__VA_ARGS__};
#include "dex2oat_options.def"
#pragma GCC diagnostic push
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index fdada8f..bd8583b 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <regex> // NOLINT [build/c++11] [5]
+#include <regex>
#include <sstream>
#include <string>
#include <vector>
diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc
index 022aa1b..7509d91 100644
--- a/dex2oat/linker/oat_writer_test.cc
+++ b/dex2oat/linker/oat_writer_test.cc
@@ -718,7 +718,7 @@
key_value_store.Put(OatHeader::kImageLocationKey, "test.art");
{
// Test using the AddDexFileSource() interface with the zip file.
- std::vector<const char*> input_filenames { zip_file.GetFilename().c_str() }; // NOLINT [readability/braces] [4]
+ std::vector<const char*> input_filenames = { zip_file.GetFilename().c_str() };
ScratchFile oat_file, vdex_file(oat_file, ".vdex");
success = WriteElf(vdex_file.GetFile(), oat_file.GetFile(), input_filenames,
@@ -829,7 +829,7 @@
SafeMap<std::string, std::string> key_value_store;
key_value_store.Put(OatHeader::kImageLocationKey, "test.art");
- std::vector<const char*> input_filenames { zip_file.GetFilename().c_str() }; // NOLINT [readability/braces] [4]
+ std::vector<const char*> input_filenames = { zip_file.GetFilename().c_str() };
ScratchFile oat_file, vdex_file(oat_file, ".vdex");
std::unique_ptr<ProfileCompilationInfo> profile_compilation_info(new ProfileCompilationInfo());
success = WriteElf(vdex_file.GetFile(), oat_file.GetFile(), input_filenames,
diff --git a/imgdiag/imgdiag.cc b/imgdiag/imgdiag.cc
index f0c9158..05fce96 100644
--- a/imgdiag/imgdiag.cc
+++ b/imgdiag/imgdiag.cc
@@ -1610,7 +1610,7 @@
// BacktraceMap used for finding the memory mapping of the image file.
std::unique_ptr<BacktraceMap> proc_maps_;
// Boot image mapping.
- backtrace_map_t boot_map_{}; // NOLINT
+ backtrace_map_t boot_map_{};
// The size of the boot image mapping.
size_t boot_map_size_;
// The contents of /proc/<image_diff_pid_>/maps.
diff --git a/openjdkjvmti/jvmti_allocator.h b/openjdkjvmti/jvmti_allocator.h
index e6cbc85..11af7b6 100644
--- a/openjdkjvmti/jvmti_allocator.h
+++ b/openjdkjvmti/jvmti_allocator.h
@@ -58,7 +58,7 @@
JvmtiAllocator() : env_(nullptr) {}
template <typename U>
- JvmtiAllocator(const JvmtiAllocator<U>& other) // NOLINT, implicit
+ JvmtiAllocator(const JvmtiAllocator<U>& other)
: env_(other.env_) {}
JvmtiAllocator(const JvmtiAllocator& other) = default;
@@ -95,7 +95,7 @@
JvmtiAllocator() : env_(nullptr) {}
template <typename U>
- JvmtiAllocator(const JvmtiAllocator<U>& other) // NOLINT, implicit
+ JvmtiAllocator(const JvmtiAllocator<U>& other)
: env_(other.env_) {}
JvmtiAllocator(const JvmtiAllocator& other) = default;
diff --git a/openjdkjvmti/ti_class.cc b/openjdkjvmti/ti_class.cc
index 2c5e5f9..e69c78b 100644
--- a/openjdkjvmti/ti_class.cc
+++ b/openjdkjvmti/ti_class.cc
@@ -33,7 +33,7 @@
#include "android-base/stringprintf.h"
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <unordered_set>
#include "art_jvmti.h"
diff --git a/openjdkjvmti/ti_extension.cc b/openjdkjvmti/ti_extension.cc
index d3e0912..afd0723 100644
--- a/openjdkjvmti/ti_extension.cc
+++ b/openjdkjvmti/ti_extension.cc
@@ -54,7 +54,7 @@
JvmtiUniquePtr<char[]> param_name = CopyString(env, name, err);
char* name_ptr = param_name.get();
char_buffers->push_back(std::move(param_name));
- return jvmtiParamInfo { name_ptr, kind, base_type, null_ok }; // NOLINT [whitespace/braces] [4]
+ return jvmtiParamInfo{ name_ptr, kind, base_type, null_ok };
}
};
@@ -146,7 +146,7 @@
"com.android.art.heap.get_object_heap_id",
"Retrieve the heap id of the the object tagged with the given argument. An "
"arbitrary object is chosen if multiple objects exist with the same tag.",
- { // NOLINT [whitespace/braces] [4]
+ {
{ "tag", JVMTI_KIND_IN, JVMTI_TYPE_JLONG, false},
{ "heap_id", JVMTI_KIND_OUT, JVMTI_TYPE_JINT, false}
},
@@ -159,7 +159,7 @@
reinterpret_cast<jvmtiExtensionFunction>(HeapExtensions::GetHeapName),
"com.android.art.heap.get_heap_name",
"Retrieve the name of the heap with the given id.",
- { // NOLINT [whitespace/braces] [4]
+ {
{ "heap_id", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false},
{ "heap_name", JVMTI_KIND_ALLOC_BUF, JVMTI_TYPE_CCHAR, false}
},
@@ -175,13 +175,13 @@
" except for additionally passing the heap id of the current object. The jvmtiHeapCallbacks"
" structure is reused, with the callbacks field overloaded to a signature of "
"jint (*)(jlong, jlong, jlong*, jint length, void*, jint).",
- { // NOLINT [whitespace/braces] [4]
+ {
{ "heap_filter", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false},
{ "klass", JVMTI_KIND_IN, JVMTI_TYPE_JCLASS, true},
{ "callbacks", JVMTI_KIND_IN_PTR, JVMTI_TYPE_CVOID, false},
{ "user_data", JVMTI_KIND_IN_PTR, JVMTI_TYPE_CVOID, true}
},
- { // NOLINT [whitespace/braces] [4]
+ {
ERR(MUST_POSSESS_CAPABILITY),
ERR(INVALID_CLASS),
ERR(NULL_POINTER),
@@ -197,7 +197,7 @@
" 'Allocate' jvmti function. This does not include any memory that has been deallocated"
" through the 'Deallocate' function. This number is approximate and might not correspond"
" exactly to the sum of the sizes of all not freed allocations.",
- { // NOLINT [whitespace/braces] [4]
+ {
{ "currently_allocated", JVMTI_KIND_OUT, JVMTI_TYPE_JLONG, false},
},
{ ERR(NULL_POINTER) });
@@ -213,7 +213,7 @@
" chunk format. It returns the processed chunk. This is provided for backwards compatibility"
" reasons only. Agents should avoid making use of this extension when possible and instead"
" use the other JVMTI entrypoints explicitly.",
- { // NOLINT[whitespace/braces] [4]
+ {
{ "type_in", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false },
{ "length_in", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false },
{ "data_in", JVMTI_KIND_IN_BUF, JVMTI_TYPE_JBYTE, false },
@@ -322,7 +322,7 @@
" is responsible for interpreting the information present in the 'data' buffer. This is"
" provided for backwards-compatibility support only. Agents should prefer to use relevant"
" JVMTI events and functions above listening for this event.",
- { // NOLINT[whitespace/braces] [4]
+ {
{ "jni_env", JVMTI_KIND_IN_PTR, JVMTI_TYPE_JNIENV, false },
{ "type", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false },
{ "data_size", JVMTI_KIND_IN, JVMTI_TYPE_JINT, false },
diff --git a/openjdkjvmti/ti_monitor.cc b/openjdkjvmti/ti_monitor.cc
index b31e9f2..7db0566 100644
--- a/openjdkjvmti/ti_monitor.cc
+++ b/openjdkjvmti/ti_monitor.cc
@@ -32,9 +32,9 @@
#include "ti_monitor.h"
#include <atomic>
-#include <chrono> // NOLINT [build/c++11] [5]
-#include <condition_variable> // NOLINT [build/c++11] [5]
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
#include "art_jvmti.h"
#include "monitor.h"
diff --git a/runtime/base/allocator.h b/runtime/base/allocator.h
index fba9308..99cdb49 100644
--- a/runtime/base/allocator.h
+++ b/runtime/base/allocator.h
@@ -111,7 +111,7 @@
// Used internally by STL data structures.
template <class U>
- TrackingAllocatorImpl( // NOLINT, implicit
+ TrackingAllocatorImpl(
const TrackingAllocatorImpl<U, kTag>& alloc ATTRIBUTE_UNUSED) noexcept {}
// Used internally by STL data structures.
diff --git a/runtime/base/arena_containers.h b/runtime/base/arena_containers.h
index 2e71156..dcdb92b 100644
--- a/runtime/base/arena_containers.h
+++ b/runtime/base/arena_containers.h
@@ -143,7 +143,7 @@
allocator_(allocator) {
}
template <typename U>
- ArenaAllocatorAdapter(const ArenaAllocatorAdapter<U>& other) // NOLINT, implicit
+ ArenaAllocatorAdapter(const ArenaAllocatorAdapter<U>& other)
: ArenaAllocatorAdapterKind(other),
allocator_(other.allocator_) {
}
@@ -179,7 +179,7 @@
allocator_(allocator) {
}
template <typename U>
- ArenaAllocatorAdapter(const ArenaAllocatorAdapter<U>& other) // NOLINT, implicit
+ ArenaAllocatorAdapter(const ArenaAllocatorAdapter<U>& other)
: ArenaAllocatorAdapterKind(other),
allocator_(other.allocator_) {
}
diff --git a/runtime/base/bit_string.h b/runtime/base/bit_string.h
index 1cda021..a2164f3 100644
--- a/runtime/base/bit_string.h
+++ b/runtime/base/bit_string.h
@@ -248,7 +248,7 @@
// Does this bitstring contain exactly 0 characters?
bool IsEmpty() const {
- return (*this) == BitString{}; // NOLINT
+ return (*this) == BitString{};
}
// Remove all BitStringChars starting at end.
diff --git a/runtime/base/bit_string_test.cc b/runtime/base/bit_string_test.cc
index d5610e7..96aa154 100644
--- a/runtime/base/bit_string_test.cc
+++ b/runtime/base/bit_string_test.cc
@@ -47,7 +47,7 @@
BitString MakeBitString(std::initializer_list<size_t> values = {}) {
CHECK_GE(BitString::kCapacity, values.size());
- BitString bs{}; // NOLINT
+ BitString bs{};
size_t i = 0;
for (size_t val : values) {
@@ -68,7 +68,7 @@
// Make max bitstring, e.g. BitString[4095,7,255] for {12,3,8}
template <size_t kCount = BitString::kCapacity>
BitString MakeBitStringMax() {
- BitString bs{}; // NOLINT
+ BitString bs{};
for (size_t i = 0; i < kCount; ++i) {
bs.SetAt(i,
diff --git a/runtime/base/bit_struct.h b/runtime/base/bit_struct.h
index 16b555e..b207459 100644
--- a/runtime/base/bit_struct.h
+++ b/runtime/base/bit_struct.h
@@ -288,7 +288,7 @@
//
// See top of file for usage example.
#define BITSTRUCT_DEFINE_END(name) \
- }; /* NOLINT [readability/braces] [4] */ \
+ }; \
static_assert(art::detail::ValidateBitStructSize<name>(), \
#name "bitsize incorrect: " \
"did you insert extra fields that weren't BitStructX, " \
diff --git a/runtime/base/bit_struct_detail.h b/runtime/base/bit_struct_detail.h
index 49d432e..912f51c 100644
--- a/runtime/base/bit_struct_detail.h
+++ b/runtime/base/bit_struct_detail.h
@@ -79,7 +79,7 @@
using FalseT = std::integral_constant<bool, false>::type;
template <typename C>
- static constexpr auto Test(void*) -> decltype(std::declval<C>()._, TrueT{}); // NOLINT
+ static constexpr auto Test(void*) -> decltype(std::declval<C>()._, TrueT{});
template <typename>
static constexpr FalseT Test(...);
diff --git a/runtime/base/bit_struct_test.cc b/runtime/base/bit_struct_test.cc
index a80d39e..577682c 100644
--- a/runtime/base/bit_struct_test.cc
+++ b/runtime/base/bit_struct_test.cc
@@ -73,7 +73,7 @@
TEST(BitStructs, Custom) {
CustomBitStruct expected(0b1111);
- BitStructField<CustomBitStruct, /*lsb*/4, /*width*/4> f{}; // NOLINT
+ BitStructField<CustomBitStruct, /*lsb*/4, /*width*/4> f{};
EXPECT_EQ(1u, sizeof(f));
@@ -95,7 +95,7 @@
VALIDATE_BITSTRUCT_SIZE(TestTwoCustom);
- TestTwoCustom cst{}; // NOLINT
+ TestTwoCustom cst{};
// Test the write to most-significant field doesn't clobber least-significant.
cst.f4_a = CustomBitStruct(0b0110);
@@ -122,7 +122,7 @@
}
TEST(BitStructs, Number) {
- BitStructNumber<uint16_t, /*lsb*/4, /*width*/4> bsn{}; // NOLINT
+ BitStructNumber<uint16_t, /*lsb*/4, /*width*/4> bsn{};
EXPECT_EQ(2u, sizeof(bsn));
bsn = 0b1111;
@@ -154,7 +154,7 @@
EXPECT_EQ(1u, sizeof(u4));
EXPECT_EQ(1u, sizeof(alias_all));
}
- TestBitStruct tst{}; // NOLINT
+ TestBitStruct tst{};
// Check minimal size selection is correct.
EXPECT_EQ(1u, sizeof(TestBitStruct));
@@ -229,7 +229,7 @@
TEST(BitStructs, Mixed) {
EXPECT_EQ(4u, sizeof(MixedSizeBitStruct));
- MixedSizeBitStruct tst{}; // NOLINT
+ MixedSizeBitStruct tst{};
// Check operator assignment.
tst.u3 = 0b111u;
@@ -263,11 +263,11 @@
BITSTRUCT_DEFINE_END(TestBitStruct_u8);
TEST(BitStructs, FieldAssignment) {
- TestBitStruct_u8 all_1s{}; // NOLINT
+ TestBitStruct_u8 all_1s{};
all_1s.alias_all = 0xffu;
{
- TestBitStruct_u8 tst{}; // NOLINT
+ TestBitStruct_u8 tst{};
tst.i3 = all_1s.i3;
// Copying a single bitfield does not copy all bitfields.
@@ -275,7 +275,7 @@
}
{
- TestBitStruct_u8 tst{}; // NOLINT
+ TestBitStruct_u8 tst{};
tst.u4 = all_1s.u4;
// Copying a single bitfield does not copy all bitfields.
@@ -291,13 +291,13 @@
BITSTRUCT_DEFINE_END(NestedStruct);
TEST(BitStructs, NestedFieldAssignment) {
- MixedSizeBitStruct mixed_all_1s{}; // NOLINT
+ MixedSizeBitStruct mixed_all_1s{};
mixed_all_1s.alias_all = 0xFFFFFFFFu;
{
- NestedStruct xyz{}; // NOLINT
+ NestedStruct xyz{};
- NestedStruct other{}; // NOLINT
+ NestedStruct other{};
other.mixed_upper = mixed_all_1s;
other.mixed_lower = mixed_all_1s;
@@ -307,9 +307,9 @@
}
{
- NestedStruct xyz{}; // NOLINT
+ NestedStruct xyz{};
- NestedStruct other{}; // NOLINT
+ NestedStruct other{};
other.mixed_upper = mixed_all_1s;
other.mixed_lower = mixed_all_1s;
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index 877f052..3adebe7 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -584,7 +584,7 @@
#if ART_USE_FUTEXES
, state_(0), num_pending_readers_(0), num_pending_writers_(0)
#endif
-{ // NOLINT(whitespace/braces)
+{
#if !ART_USE_FUTEXES
CHECK_MUTEX_CALL(pthread_rwlock_init, (&rwlock_, nullptr));
#endif
diff --git a/runtime/base/scoped_arena_containers.h b/runtime/base/scoped_arena_containers.h
index fccaaea..756089f 100644
--- a/runtime/base/scoped_arena_containers.h
+++ b/runtime/base/scoped_arena_containers.h
@@ -110,7 +110,7 @@
arena_stack_(allocator->arena_stack_) {
}
template <typename U>
- ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter<U>& other) // NOLINT, implicit
+ ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter<U>& other)
: DebugStackReference(other),
DebugStackIndirectTopRef(other),
ArenaAllocatorAdapterKind(other),
@@ -153,7 +153,7 @@
arena_stack_(allocator->arena_stack_) {
}
template <typename U>
- ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter<U>& other) // NOLINT, implicit
+ ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter<U>& other)
: DebugStackReference(other),
DebugStackIndirectTopRef(other),
ArenaAllocatorAdapterKind(other),
diff --git a/runtime/base/transform_array_ref.h b/runtime/base/transform_array_ref.h
index b432f86..a4e0bc2 100644
--- a/runtime/base/transform_array_ref.h
+++ b/runtime/base/transform_array_ref.h
@@ -72,7 +72,7 @@
template <typename OtherBT,
typename = typename std::enable_if<std::is_same<BaseType, const OtherBT>::value>::type>
- TransformArrayRef(const TransformArrayRef<OtherBT, Function>& other) // NOLINT, implicit
+ TransformArrayRef(const TransformArrayRef<OtherBT, Function>& other)
: TransformArrayRef(other.base(), other.GetFunction()) { }
// Assignment operators.
diff --git a/runtime/base/transform_array_ref_test.cc b/runtime/base/transform_array_ref_test.cc
index 494dbb2..da0340d 100644
--- a/runtime/base/transform_array_ref_test.cc
+++ b/runtime/base/transform_array_ref_test.cc
@@ -38,7 +38,7 @@
} // anonymous namespace
TEST(TransformArrayRef, ConstRefAdd1) {
- auto add1 = [](const ValueHolder& h) { return h.value + 1; }; // NOLINT [readability/braces]
+ auto add1 = [](const ValueHolder& h) { return h.value + 1; };
std::vector<ValueHolder> input({ 7, 6, 4, 0 });
std::vector<int> output;
@@ -79,7 +79,7 @@
}
TEST(TransformArrayRef, NonConstRefSub1) {
- auto sub1 = [](ValueHolder& h) { return h.value - 1; }; // NOLINT [readability/braces]
+ auto sub1 = [](ValueHolder& h) { return h.value - 1; };
std::vector<ValueHolder> input({ 4, 4, 5, 7, 10 });
std::vector<int> output;
diff --git a/runtime/base/transform_iterator.h b/runtime/base/transform_iterator.h
index f1a8a52..9c8f822 100644
--- a/runtime/base/transform_iterator.h
+++ b/runtime/base/transform_iterator.h
@@ -62,7 +62,7 @@
: data_(base, fn) { }
template <typename OtherBI>
- TransformIterator(const TransformIterator<OtherBI, Function>& other) // NOLINT, implicit
+ TransformIterator(const TransformIterator<OtherBI, Function>& other)
: data_(other.base(), other.GetFunction()) {
}
diff --git a/runtime/base/transform_iterator_test.cc b/runtime/base/transform_iterator_test.cc
index a85dda8..63b6e4f 100644
--- a/runtime/base/transform_iterator_test.cc
+++ b/runtime/base/transform_iterator_test.cc
@@ -41,7 +41,7 @@
} // anonymous namespace
TEST(TransformIterator, VectorAdd1) {
- auto add1 = [](const ValueHolder& h) { return h.value + 1; }; // NOLINT [readability/braces]
+ auto add1 = [](const ValueHolder& h) { return h.value + 1; };
std::vector<ValueHolder> input({ 1, 7, 3, 8 });
std::vector<int> output;
@@ -144,7 +144,7 @@
}
TEST(TransformIterator, ListSub1) {
- auto sub1 = [](const ValueHolder& h) { return h.value - 1; }; // NOLINT [readability/braces]
+ auto sub1 = [](const ValueHolder& h) { return h.value - 1; };
std::list<ValueHolder> input({ 2, 3, 5, 7, 11 });
std::vector<int> output;
@@ -208,7 +208,7 @@
}
TEST(TransformIterator, ForwardListSub1) {
- auto mul3 = [](const ValueHolder& h) { return h.value * 3; }; // NOLINT [readability/braces]
+ auto mul3 = [](const ValueHolder& h) { return h.value * 3; };
std::forward_list<ValueHolder> input({ 1, 1, 2, 3, 5, 8 });
std::vector<int> output;
@@ -246,7 +246,7 @@
}
TEST(TransformIterator, VectorConstReference) {
- auto ref = [](const ValueHolder& h) -> const int& { return h.value; }; // NOLINT [readability/braces]
+ auto ref = [](const ValueHolder& h) -> const int& { return h.value; };
std::vector<ValueHolder> input({ 7, 3, 1, 2, 4, 8 });
std::vector<int> output;
@@ -339,7 +339,7 @@
}
TEST(TransformIterator, VectorNonConstReference) {
- auto ref = [](ValueHolder& h) -> int& { return h.value; }; // NOLINT [readability/braces]
+ auto ref = [](ValueHolder& h) -> int& { return h.value; };
std::vector<ValueHolder> input({ 7, 3, 1, 2, 4, 8 });
std::vector<int> output;
@@ -519,7 +519,7 @@
}
TEST(TransformIterator, TransformRange) {
- auto ref = [](ValueHolder& h) -> int& { return h.value; }; // NOLINT [readability/braces]
+ auto ref = [](ValueHolder& h) -> int& { return h.value; };
std::vector<ValueHolder> data({ 1, 0, 1, 3, 1, 0 });
for (int& v : MakeTransformRange(data, ref)) {
diff --git a/runtime/base/variant_map.h b/runtime/base/variant_map.h
index fe332d1..c480b51 100644
--- a/runtime/base/variant_map.h
+++ b/runtime/base/variant_map.h
@@ -139,7 +139,7 @@
// then that is used. Otherwise, the default value for the type TValue{} is returned.
TValue CreateDefaultValue() const {
if (default_value_ == nullptr) {
- return TValue{}; // NOLINT [readability/braces] [4]
+ return TValue{};
} else {
return TValue(*default_value_);
}
diff --git a/runtime/base/variant_map_test.cc b/runtime/base/variant_map_test.cc
index 9dd29ba..4677b6d 100644
--- a/runtime/base/variant_map_test.cc
+++ b/runtime/base/variant_map_test.cc
@@ -107,8 +107,8 @@
fmFilled.Set(FruitMap::Orange, 555.0);
EXPECT_EQ(size_t(2), fmFilled.Size());
- // Test copy constructor (NOLINT as a reference is suggested, instead)
- FruitMap fmEmptyCopy(fmEmpty); // NOLINT
+ // Test copy constructor
+ FruitMap fmEmptyCopy(fmEmpty);
EXPECT_EQ(size_t(0), fmEmptyCopy.Size());
// Test copy constructor
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 493468b..ef1647c 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -78,11 +78,11 @@
255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255,
255, 254, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, // NOLINT
- 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, // NOLINT
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255,
255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, // NOLINT
- 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, // NOLINT
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
diff --git a/runtime/dex_file_test.cc b/runtime/dex_file_test.cc
index 90bc4b8..c963f6e 100644
--- a/runtime/dex_file_test.cc
+++ b/runtime/dex_file_test.cc
@@ -487,52 +487,52 @@
"(IDJLjava/lang/Object;)Ljava/lang/Float;",
"java.lang.Float GetMethodSignature.m1(int, double, long, java.lang.Object)"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m2",
"(ZSC)LGetMethodSignature;",
"GetMethodSignature GetMethodSignature.m2(boolean, short, char)"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m3",
"()V",
"void GetMethodSignature.m3()"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m4",
"(I)V",
"void GetMethodSignature.m4(int)"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m5",
"(II)V",
"void GetMethodSignature.m5(int, int)"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m6",
"(II[[I)V",
"void GetMethodSignature.m6(int, int, int[][])"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m7",
"(II[[ILjava/lang/Object;)V",
"void GetMethodSignature.m7(int, int, int[][], java.lang.Object)"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m8",
"(II[[ILjava/lang/Object;[[Ljava/lang/Object;)V",
"void GetMethodSignature.m8(int, int, int[][], java.lang.Object, java.lang.Object[][])"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"m9",
"()I",
"int GetMethodSignature.m9()"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"mA",
"()[[I",
"int[][] GetMethodSignature.mA()"
},
- { // NOLINT [whitespace/braces] [4]
+ {
"mB",
"()[[Ljava/lang/Object;",
"java.lang.Object[][] GetMethodSignature.mB()"
diff --git a/runtime/experimental_flags.h b/runtime/experimental_flags.h
index b7f4037..5f14438 100644
--- a/runtime/experimental_flags.h
+++ b/runtime/experimental_flags.h
@@ -30,10 +30,10 @@
};
constexpr ExperimentalFlags() : value_(0x0000) {}
- constexpr ExperimentalFlags(decltype(kNone) t) // NOLINT, implicit
+ constexpr ExperimentalFlags(decltype(kNone) t) // NOLINT [runtime/explicit]
: value_(static_cast<uint32_t>(t)) {}
- constexpr operator decltype(kNone)() const { // NOLINT, implicit
+ constexpr operator decltype(kNone)() const {
return static_cast<decltype(kNone)>(value_);
}
diff --git a/runtime/indenter.h b/runtime/indenter.h
index cc6d4c4..69b9732 100644
--- a/runtime/indenter.h
+++ b/runtime/indenter.h
@@ -32,7 +32,7 @@
public:
Indenter(std::streambuf* out, char text, size_t count)
: indent_next_(true), out_sbuf_(out),
- text_{text, text, text, text, text, text, text, text}, // NOLINT(whitespace/braces)
+ text_{text, text, text, text, text, text, text, text},
count_(count) {}
private:
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index 36a2416..5603963 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -21,7 +21,7 @@
#include <sys/types.h>
#include <map>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <string>
#include "android-base/thread_annotations.h"
diff --git a/runtime/obj_ptr.h b/runtime/obj_ptr.h
index 9a66983..70e767a 100644
--- a/runtime/obj_ptr.h
+++ b/runtime/obj_ptr.h
@@ -49,23 +49,22 @@
// Note: The following constructors allow implicit conversion. This simplifies code that uses
// them, e.g., for parameter passing. However, in general, implicit-conversion constructors
- // are discouraged and detected by cpplint and clang-tidy. So mark these constructors
- // as NOLINT (without category, as the categories are different).
+ // are discouraged and detected by clang-tidy.
- ALWAYS_INLINE ObjPtr(std::nullptr_t) // NOLINT
+ ALWAYS_INLINE ObjPtr(std::nullptr_t)
REQUIRES_SHARED(Locks::mutator_lock_)
: reference_(0u) {}
template <typename Type,
typename = typename std::enable_if<std::is_base_of<MirrorType, Type>::value>::type>
- ALWAYS_INLINE ObjPtr(Type* ptr) // NOLINT
+ ALWAYS_INLINE ObjPtr(Type* ptr)
REQUIRES_SHARED(Locks::mutator_lock_)
: reference_(Encode(static_cast<MirrorType*>(ptr))) {
}
template <typename Type,
typename = typename std::enable_if<std::is_base_of<MirrorType, Type>::value>::type>
- ALWAYS_INLINE ObjPtr(const ObjPtr<Type>& other) // NOLINT
+ ALWAYS_INLINE ObjPtr(const ObjPtr<Type>& other)
REQUIRES_SHARED(Locks::mutator_lock_)
: reference_(kObjPtrPoisoningValidateOnCopy
? Encode(static_cast<MirrorType*>(other.Ptr()))
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index cc09a77..85af560 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -548,7 +548,7 @@
// If not low memory mode, semispace otherwise.
gc::CollectorType background_collector_type_;
- gc::CollectorType collector_type_ = (XGcOption{}).collector_type_; // NOLINT [whitespace/braces] [5]
+ gc::CollectorType collector_type_ = (XGcOption{}).collector_type_;
bool low_memory_mode_ = args.Exists(M::LowMemoryMode);
background_collector_type_ = args.GetOrDefault(M::BackgroundGc);
diff --git a/runtime/prebuilt_tools_test.cc b/runtime/prebuilt_tools_test.cc
index 6fa9b34..158d9d6 100644
--- a/runtime/prebuilt_tools_test.cc
+++ b/runtime/prebuilt_tools_test.cc
@@ -29,7 +29,7 @@
};
static void CheckToolsExist(const std::string& tools_dir) {
- const char* tools[] { "as", "objcopy", "objdump" }; // NOLINT
+ const char* tools[] = { "as", "objcopy", "objdump" };
for (const char* tool : tools) {
struct stat exec_st;
std::string exec_path = tools_dir + tool;
@@ -50,7 +50,7 @@
TEST_F(PrebuiltToolsTest, CheckTargetTools) {
// Other prebuilts are missing from the build server's repo manifest.
- InstructionSet isas[] = { InstructionSet::kThumb2 }; // NOLINT
+ InstructionSet isas[] = { InstructionSet::kThumb2 };
for (InstructionSet isa : isas) {
std::string tools_dir = GetAndroidTargetToolsDir(isa);
if (tools_dir.empty()) {
diff --git a/runtime/reference_table_test.cc b/runtime/reference_table_test.cc
index 720a9d6..1e7fc3e 100644
--- a/runtime/reference_table_test.cc
+++ b/runtime/reference_table_test.cc
@@ -16,7 +16,7 @@
#include "reference_table.h"
-#include <regex> // NOLINT [build/c++11] [5]
+#include <regex>
#include "android-base/stringprintf.h"
diff --git a/runtime/runtime_callbacks_test.cc b/runtime/runtime_callbacks_test.cc
index d283c79..0b69851 100644
--- a/runtime/runtime_callbacks_test.cc
+++ b/runtime/runtime_callbacks_test.cc
@@ -22,7 +22,7 @@
#include <initializer_list>
#include <memory>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <string>
#include "jni.h"
diff --git a/runtime/runtime_options.cc b/runtime/runtime_options.cc
index b072bb0..bce0d81 100644
--- a/runtime/runtime_options.cc
+++ b/runtime/runtime_options.cc
@@ -30,7 +30,7 @@
// Specify storage for the RuntimeOptions keys.
-#define RUNTIME_OPTIONS_KEY(Type, Name, ...) const RuntimeArgumentMap::Key<Type> RuntimeArgumentMap::Name {__VA_ARGS__}; // NOLINT [readability/braces] [4]
+#define RUNTIME_OPTIONS_KEY(Type, Name, ...) const RuntimeArgumentMap::Key<Type> RuntimeArgumentMap::Name {__VA_ARGS__};
#include "runtime_options.def"
} // namespace art
diff --git a/runtime/subtype_check.h b/runtime/subtype_check.h
index 24f0763..1556abe 100644
--- a/runtime/subtype_check.h
+++ b/runtime/subtype_check.h
@@ -274,7 +274,7 @@
// more complicated (e.g. ObjPtr or Depth call) will fail dchecks.
// OK. zero-initializing subtype_check_info_ puts us into the kUninitialized state.
- SubtypeCheckBits scb_uninitialized = SubtypeCheckBits{}; // NOLINT
+ SubtypeCheckBits scb_uninitialized = SubtypeCheckBits{};
WriteSubtypeCheckBits(klass, scb_uninitialized);
// Do not use "SubtypeCheckInfo" API here since that requires Depth()
diff --git a/runtime/subtype_check_info.h b/runtime/subtype_check_info.h
index d10d472..cd579c3 100644
--- a/runtime/subtype_check_info.h
+++ b/runtime/subtype_check_info.h
@@ -188,7 +188,7 @@
// Returns a new root SubtypeCheckInfo with a blank PathToRoot.
// Post-condition: The return valued has an Assigned state.
static SubtypeCheckInfo CreateRoot() {
- SubtypeCheckInfo io{}; // NOLINT
+ SubtypeCheckInfo io{};
io.depth_ = 0u;
io.SetNext(io.GetNext() + 1u);
@@ -220,7 +220,7 @@
child.MaybeInitNext();
// Always clear the inherited Parent's next Value on the child.
- OverwriteNextValueFromParent(/*inout*/&child, BitStringChar{}); // NOLINT
+ OverwriteNextValueFromParent(/*inout*/&child, BitStringChar{});
// The state is now Initialized | Overflowed.
DCHECK_NE(kAssigned, child.GetState()) << child.GetBitString();
@@ -392,7 +392,7 @@
// Clearing out the "Next" value like this
// is often an intermediate operation which temporarily
// violates the invariants. Do not do the extra dchecks.
- SetNextUnchecked(BitStringChar{}); // NOLINT
+ SetNextUnchecked(BitStringChar{});
SetNextUnchecked(GetNext()+1u);
}
}
diff --git a/runtime/subtype_check_info_test.cc b/runtime/subtype_check_info_test.cc
index bc2e84e..338d75a 100644
--- a/runtime/subtype_check_info_test.cc
+++ b/runtime/subtype_check_info_test.cc
@@ -47,7 +47,7 @@
BitString MakeBitString(std::initializer_list<size_t> values = {}) {
CHECK_GE(BitString::kCapacity, values.size());
- BitString bs{}; // NOLINT
+ BitString bs{};
size_t i = 0;
for (size_t val : values) {
@@ -68,7 +68,7 @@
// Make max bistring, e.g. BitString[4095,7,255] for {12,3,8}
template <size_t kCount = BitString::kCapacity>
BitString MakeBitStringMax() {
- BitString bs{}; // NOLINT
+ BitString bs{};
for (size_t i = 0; i < kCount; ++i) {
bs.SetAt(i,
@@ -132,7 +132,7 @@
// Create an SubtypeCheckInfo with the same depth, but with everything else reset.
// Returns: SubtypeCheckInfo in the Uninitialized state.
static SubtypeCheckInfo CopyCleared(SubtypeCheckInfo sc) {
- SubtypeCheckInfo cleared_copy{}; // NOLINT
+ SubtypeCheckInfo cleared_copy{};
cleared_copy.depth_ = sc.depth_;
DCHECK_EQ(SubtypeCheckInfo::kUninitialized, cleared_copy.GetState());
return cleared_copy;
@@ -260,7 +260,7 @@
SubtypeCheckInfo io =
MakeSubtypeCheckInfo(/*path_to_root*/MakeBitStringMax(),
- /*next*/BitStringChar{}, // NOLINT
+ /*next*/BitStringChar{},
/*overflow*/false,
/*depth*/BitString::kCapacity);
// 0b11111...000 where MSB == 1, and leading 1s = the maximum bitstring representation.
@@ -329,7 +329,7 @@
// CopyCleared is just a thin wrapper around value-init and providing the depth.
SubtypeCheckInfo cleared_copy_value =
- SubtypeCheckInfo::Create(SubtypeCheckBits{}, /*depth*/1u); // NOLINT
+ SubtypeCheckInfo::Create(SubtypeCheckBits{}, /*depth*/1u);
EXPECT_EQ(SubtypeCheckInfo::kUninitialized, cleared_copy_value.GetState());
EXPECT_EQ(MakeBitString({}), GetPathToRoot(cleared_copy_value));
}
diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc
index 6800d02..b8ab51b 100644
--- a/sigchainlib/sigchain.cc
+++ b/sigchainlib/sigchain.cc
@@ -30,7 +30,7 @@
#include <string.h>
#include <initializer_list>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <utility>
#include "sigchain.h"
diff --git a/test/1919-vminit-thread-start-timing/vminit.cc b/test/1919-vminit-thread-start-timing/vminit.cc
index c492e8b..109c61f 100644
--- a/test/1919-vminit-thread-start-timing/vminit.cc
+++ b/test/1919-vminit-thread-start-timing/vminit.cc
@@ -16,8 +16,8 @@
#include "1919-vminit-thread-start-timing/vminit.h"
-#include <mutex> // NOLINT [build/c++11] [5]
-#include <thread> // NOLINT [build/c++11] [5]
+#include <mutex>
+#include <thread>
#include <vector>
#include <jni.h>
diff --git a/test/901-hello-ti-agent/basics.cc b/test/901-hello-ti-agent/basics.cc
index 11b32e4..472f2b7 100644
--- a/test/901-hello-ti-agent/basics.cc
+++ b/test/901-hello-ti-agent/basics.cc
@@ -16,7 +16,7 @@
#include "901-hello-ti-agent/basics.h"
-#include <thread> // NOLINT [build/c++11] [5]
+#include <thread>
#include <jni.h>
#include <stdio.h>
diff --git a/test/904-object-allocation/tracking.cc b/test/904-object-allocation/tracking.cc
index 81d1b2c..9d2592a 100644
--- a/test/904-object-allocation/tracking.cc
+++ b/test/904-object-allocation/tracking.cc
@@ -18,7 +18,7 @@
#include <cstdio>
#include <iostream>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <vector>
#include "android-base/logging.h"
diff --git a/test/912-classes/classes.cc b/test/912-classes/classes.cc
index a847472..1f6954e 100644
--- a/test/912-classes/classes.cc
+++ b/test/912-classes/classes.cc
@@ -16,8 +16,8 @@
#include <stdio.h>
-#include <condition_variable> // NOLINT [build/c++11] [5]
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <condition_variable>
+#include <mutex>
#include <vector>
#include "android-base/macros.h"
diff --git a/test/912-classes/classes_art.cc b/test/912-classes/classes_art.cc
index 92a3ba0..de2e456 100644
--- a/test/912-classes/classes_art.cc
+++ b/test/912-classes/classes_art.cc
@@ -16,7 +16,7 @@
#include <stdio.h>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <vector>
#include "android-base/macros.h"
diff --git a/test/924-threads/threads.cc b/test/924-threads/threads.cc
index 8330179..8caff76 100644
--- a/test/924-threads/threads.cc
+++ b/test/924-threads/threads.cc
@@ -16,7 +16,7 @@
#include <stdio.h>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <string>
#include <vector>
diff --git a/tools/breakpoint-logger/breakpoint_logger.cc b/tools/breakpoint-logger/breakpoint_logger.cc
index b48a178..2f8b682 100644
--- a/tools/breakpoint-logger/breakpoint_logger.cc
+++ b/tools/breakpoint-logger/breakpoint_logger.cc
@@ -383,7 +383,7 @@
return JNI_ERR;
}
- jvmtiCapabilities caps {}; // NOLINT [readability/braces]
+ jvmtiCapabilities caps{};
caps.can_generate_breakpoint_events = JNI_TRUE;
caps.can_get_line_numbers = JNI_TRUE;
caps.can_get_source_file_name = JNI_TRUE;
@@ -394,7 +394,7 @@
return JNI_ERR;
}
- jvmtiEventCallbacks callbacks {}; // NOLINT [readability/braces]
+ jvmtiEventCallbacks callbacks{};
callbacks.Breakpoint = &BreakpointCB;
callbacks.VMInit = &VMInitCB;
diff --git a/tools/titrace/titrace.cc b/tools/titrace/titrace.cc
index e812280..981ad56 100644
--- a/tools/titrace/titrace.cc
+++ b/tools/titrace/titrace.cc
@@ -21,7 +21,7 @@
#include <jvmti.h>
#include <map>
#include <memory>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
// We could probably return a JNI_ERR here but lets crash instead if something fails.
#define CHECK_JVMTI_ERROR(jvmti, errnum) \
@@ -195,8 +195,8 @@
std::unique_ptr<InstructionDecoder> instruction_decoder_;
- std::atomic<size_t> single_step_counter_{0u}; // NOLINT [readability/braces] [4] [whitespace/braces] [5]
- std::atomic<size_t> instruction_counter_[256]{}; // NOLINT [whitespace/braces] [5]
+ std::atomic<size_t> single_step_counter_{0u};
+ std::atomic<size_t> instruction_counter_[256]{};
// Cache the bytecode to avoid calling into JVMTI repeatedly.
// TODO: invalidate if the bytecode was updated?
@@ -256,7 +256,7 @@
TraceStatistics::Initialize(jvmti);
}
- jvmtiError error{}; // NOLINT [readability/braces] [4] [whitespace/braces] [5]
+ jvmtiError error{};
// Set capabilities.
{
diff --git a/tools/wrapagentproperties/wrapagentproperties.cc b/tools/wrapagentproperties/wrapagentproperties.cc
index 9eaffbb..8b4b062 100644
--- a/tools/wrapagentproperties/wrapagentproperties.cc
+++ b/tools/wrapagentproperties/wrapagentproperties.cc
@@ -24,7 +24,7 @@
#include <unordered_map>
#include <unordered_set>
#include <memory>
-#include <mutex> // NOLINT [build/c++11] [5]
+#include <mutex>
#include <sstream>
#include <string>
#include <vector>