cpplint: Cleanup errors
Cleanup errors from upstream cpplint in preparation
for moving art's cpplint fork to upstream tip-of-tree cpplint.
Test: cd art && mm
Bug: 68951293
Change-Id: I15faed4594cbcb8399850f8bdee39d42c0c5b956
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h
index 0683577..bcda41a 100644
--- a/compiler/common_compiler_test.h
+++ b/compiler/common_compiler_test.h
@@ -28,7 +28,7 @@
namespace art {
namespace mirror {
- class ClassLoader;
+class ClassLoader;
} // namespace mirror
class CompilerDriver;
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 6c542c8..cfed6d5 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -24,12 +24,12 @@
namespace art {
namespace jit {
- class JitCodeCache;
- class JitLogger;
+class JitCodeCache;
+class JitLogger;
} // namespace jit
namespace mirror {
- class ClassLoader;
- class DexCache;
+class ClassLoader;
+class DexCache;
} // namespace mirror
class ArtMethod;
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index ab2a681..a71f61a 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -30,7 +30,7 @@
namespace art {
namespace verifier {
- class VerifierDepsTest;
+class VerifierDepsTest;
} // namespace verifier
class DexFile;
diff --git a/compiler/jit/jit_logger.h b/compiler/jit/jit_logger.h
index 19be9aa..8b39888 100644
--- a/compiler/jit/jit_logger.h
+++ b/compiler/jit/jit_logger.h
@@ -86,7 +86,7 @@
// so that jitted code can be displayed in assembly view.
//
class JitLogger {
- public:
+ public:
JitLogger() : code_index_(0), marker_address_(nullptr) {}
void OpenLog() {
@@ -105,7 +105,7 @@
CloseJitDumpLog();
}
- private:
+ private:
// For perf-map profiling
void OpenPerfMapLog();
void WritePerfMapLog(const void* ptr, size_t code_size, ArtMethod* method)
diff --git a/compiler/linker/mips64/relative_patcher_mips64.h b/compiler/linker/mips64/relative_patcher_mips64.h
index 6d7c638..183bbed 100644
--- a/compiler/linker/mips64/relative_patcher_mips64.h
+++ b/compiler/linker/mips64/relative_patcher_mips64.h
@@ -24,7 +24,7 @@
class Mips64RelativePatcher FINAL : public RelativePatcher {
public:
- explicit Mips64RelativePatcher() {}
+ Mips64RelativePatcher() {}
uint32_t ReserveSpace(uint32_t offset,
const CompiledMethod* compiled_method,
diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc
index a8f7e86..9e7455d 100644
--- a/compiler/optimizing/code_generator_arm_vixl.cc
+++ b/compiler/optimizing/code_generator_arm_vixl.cc
@@ -3891,7 +3891,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -3921,7 +3921,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
default:
@@ -4102,7 +4102,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -4146,7 +4146,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
default:
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index 9b35160..ad0e71a 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -2545,7 +2545,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -2862,7 +2862,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -2912,7 +2912,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
default:
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc
index 8f7961e..d64a497 100644
--- a/compiler/optimizing/code_generator_x86_64.cc
+++ b/compiler/optimizing/code_generator_x86_64.cc
@@ -970,7 +970,7 @@
case kCondGT: return kAbove;
case kCondGE: return kAboveEqual;
default: break; // should not happen
- };
+ }
LOG(FATAL) << "Unreachable";
UNREACHABLE();
}
@@ -2635,7 +2635,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -2948,7 +2948,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
case DataType::Type::kFloat64:
@@ -3000,7 +3000,7 @@
default:
LOG(FATAL) << "Unexpected type conversion from " << input_type
<< " to " << result_type;
- };
+ }
break;
default:
diff --git a/compiler/optimizing/induction_var_analysis.cc b/compiler/optimizing/induction_var_analysis.cc
index 0987293..e2747af 100644
--- a/compiler/optimizing/induction_var_analysis.cc
+++ b/compiler/optimizing/induction_var_analysis.cc
@@ -683,7 +683,7 @@
CreateConstant(0, type_),
c->fetch,
type_);
- };
+ }
break;
case kRem:
// Idiomatic MOD wrap-around induction.
diff --git a/compiler/optimizing/induction_var_analysis_test.cc b/compiler/optimizing/induction_var_analysis_test.cc
index 4c11ad4..f87b46d 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>
+#include <regex> // NOLINT [build/c++11] [5]
#include "base/arena_allocator.h"
#include "builder.h"
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index c672dae..69c5827 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -765,7 +765,7 @@
vector_static_peeling_factor_ = 0;
vector_dynamic_peeling_candidate_ = nullptr;
vector_runtime_test_a_ =
- vector_runtime_test_b_= nullptr;
+ vector_runtime_test_b_ = nullptr;
// Phis in the loop-body prevent vectorization.
if (!block->GetPhis().IsEmpty()) {
diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h
index 9aba912..e90c30d 100644
--- a/compiler/optimizing/optimizing_unit_test.h
+++ b/compiler/optimizing/optimizing_unit_test.h
@@ -161,7 +161,7 @@
// An alias for the empty string used to make it clear that a line is
// removed in a diff.
-static const std::string removed = "";
+static const std::string removed = ""; // NOLINT [runtime/string] [4]
// Naive patch command: apply a diff to a string.
inline std::string Patch(const std::string& original, const diff_t& diff) {
diff --git a/compiler/optimizing/scheduler.h b/compiler/optimizing/scheduler.h
index afdf6f1..a6e1603 100644
--- a/compiler/optimizing/scheduler.h
+++ b/compiler/optimizing/scheduler.h
@@ -392,7 +392,7 @@
*/
class RandomSchedulingNodeSelector : public SchedulingNodeSelector {
public:
- explicit RandomSchedulingNodeSelector() : seed_(0) {
+ RandomSchedulingNodeSelector() : seed_(0) {
seed_ = static_cast<uint32_t>(NanoTime());
srand(seed_);
}
diff --git a/compiler/optimizing/side_effects_analysis.h b/compiler/optimizing/side_effects_analysis.h
index cf00e48..c0f81a9 100644
--- a/compiler/optimizing/side_effects_analysis.h
+++ b/compiler/optimizing/side_effects_analysis.h
@@ -25,7 +25,7 @@
class SideEffectsAnalysis : public HOptimization {
public:
- SideEffectsAnalysis(HGraph* graph, const char* pass_name = kSideEffectsAnalysisPassName)
+ explicit SideEffectsAnalysis(HGraph* graph, const char* pass_name = kSideEffectsAnalysisPassName)
: HOptimization(graph, pass_name),
graph_(graph),
block_effects_(graph->GetBlocks().size(),
diff --git a/compiler/utils/arm/assembler_arm_test.h b/compiler/utils/arm/assembler_arm_test.h
index a85a05e..8c3a11f2 100644
--- a/compiler/utils/arm/assembler_arm_test.h
+++ b/compiler/utils/arm/assembler_arm_test.h
@@ -512,7 +512,7 @@
}
protected:
- explicit AssemblerArmTest() {}
+ AssemblerArmTest() {}
virtual std::vector<Cond>& GetConditions() = 0;
virtual std::string GetConditionString(Cond c) = 0;
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index ad84412..0cb8bbb 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -734,7 +734,7 @@
}
protected:
- explicit AssemblerTest() {}
+ AssemblerTest() {}
void SetUp() OVERRIDE {
allocator_.reset(new ArenaAllocator(&pool_));
diff --git a/compiler/utils/assembler_test_base.h b/compiler/utils/assembler_test_base.h
index 2ef43bd..1482210 100644
--- a/compiler/utils/assembler_test_base.h
+++ b/compiler/utils/assembler_test_base.h
@@ -37,7 +37,7 @@
// Use a glocal static variable to keep the same name for all test data. Else we'll just spam the
// temp directory.
-static std::string tmpnam_;
+static std::string tmpnam_; // NOLINT [runtime/string] [4]
// We put this into a class as gtests are self-contained, so this helper needs to be in an h-file.
class AssemblerTestInfrastructure {
diff --git a/compiler/utils/atomic_dex_ref_map.h b/compiler/utils/atomic_dex_ref_map.h
index fad056c..205543f 100644
--- a/compiler/utils/atomic_dex_ref_map.h
+++ b/compiler/utils/atomic_dex_ref_map.h
@@ -29,7 +29,7 @@
template <typename DexFileReferenceType, typename Value>
class AtomicDexRefMap {
public:
- explicit AtomicDexRefMap() {}
+ AtomicDexRefMap() {}
~AtomicDexRefMap() {}
// Atomically swap the element in if the existing value matches expected.
diff --git a/compiler/utils/jni_macro_assembler_test.h b/compiler/utils/jni_macro_assembler_test.h
index 34ab4c3..1aefc84 100644
--- a/compiler/utils/jni_macro_assembler_test.h
+++ b/compiler/utils/jni_macro_assembler_test.h
@@ -55,7 +55,7 @@
}
protected:
- explicit JNIMacroAssemblerTest() {}
+ JNIMacroAssemblerTest() {}
void SetUp() OVERRIDE {
allocator_.reset(new ArenaAllocator(&pool_));
diff --git a/compiler/utils/label.h b/compiler/utils/label.h
index d835c63..b9d4e9c 100644
--- a/compiler/utils/label.h
+++ b/compiler/utils/label.h
@@ -27,23 +27,23 @@
class AssemblerFixup;
namespace arm64 {
- class Arm64Assembler;
+class Arm64Assembler;
} // namespace arm64
namespace mips {
- class MipsAssembler;
- class MipsLabel;
+class MipsAssembler;
+class MipsLabel;
} // namespace mips
namespace mips64 {
- class Mips64Assembler;
- class Mips64Label;
+class Mips64Assembler;
+class Mips64Label;
} // namespace mips64
namespace x86 {
- class X86Assembler;
- class NearLabel;
+class X86Assembler;
+class NearLabel;
} // namespace x86
namespace x86_64 {
- class X86_64Assembler;
- class NearLabel;
+class X86_64Assembler;
+class NearLabel;
} // namespace x86_64
class ExternalLabel {
diff --git a/compiler/verifier_deps_test.cc b/compiler/verifier_deps_test.cc
index f243e33..4709fd0 100644
--- a/compiler/verifier_deps_test.cc
+++ b/compiler/verifier_deps_test.cc
@@ -41,7 +41,7 @@
class VerifierDepsCompilerCallbacks : public CompilerCallbacks {
public:
- explicit VerifierDepsCompilerCallbacks()
+ VerifierDepsCompilerCallbacks()
: CompilerCallbacks(CompilerCallbacks::CallbackMode::kCompileApp),
deps_(nullptr) {}