Revert "Revert^2 "Use cpplint.py from repohooks""

This reverts commit c178495c22b0ea5541e173dd2f319ccbf8b05dd5.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_sc-dev-plus-aosp&target=aosp_crosshatch-userdebug&lkgb=7755813&lkbb=7756178&fkbb=7755871 (one of a few branches breaking), bug b/200807714.

Change-Id: If41be2cd7ea9440351fa78c50da2358f49ab2e93
diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk
index ab70e97..ce68214 100644
--- a/build/Android.cpplint.mk
+++ b/build/Android.cpplint.mk
@@ -20,7 +20,7 @@
 LOCAL_PATH := $(art_path)
 
 # Use upstream cpplint (toolpath from .repo/manifests/GLOBAL-PREUPLOAD.cfg).
-ART_CPPLINT := tools/repohooks/tools/cpplint.py
+ART_CPPLINT := external/google-styleguide/cpplint/cpplint.py
 
 # This file previously configured many cpplint settings.
 # Everything that could be moved to CPPLINT.cfg has moved there.
diff --git a/dex2oat/common_compiler_driver_test.cc b/dex2oat/common_compiler_driver_test.cc
index 7e71976..2007c5a 100644
--- a/dex2oat/common_compiler_driver_test.cc
+++ b/dex2oat/common_compiler_driver_test.cc
@@ -67,7 +67,7 @@
   MemMap::Init();
   image_reservation_ = MemMap::MapAnonymous("image reservation",
                                             reinterpret_cast<uint8_t*>(ART_BASE_ADDRESS),
-                                            static_cast<size_t>(120 * 1024 * 1024),  // 120MB
+                                            (size_t)120 * 1024 * 1024,  // 120MB
                                             PROT_NONE,
                                             false /* no need for 4gb flag with fixed mmap */,
                                             /*reuse=*/ false,
diff --git a/dexdump/dexdump.cc b/dexdump/dexdump.cc
index d10ed26..1d1eab8 100644
--- a/dexdump/dexdump.cc
+++ b/dexdump/dexdump.cc
@@ -1367,7 +1367,7 @@
     }
   }
 
-bail:
+ bail:
   free(typeDescriptor);
   free(accessStr);
 }
diff --git a/dexlayout/dexlayout.cc b/dexlayout/dexlayout.cc
index 86973f6..75afc78 100644
--- a/dexlayout/dexlayout.cc
+++ b/dexlayout/dexlayout.cc
@@ -1272,7 +1272,7 @@
     }
   }
 
-bail:
+ bail:
   free(type_descriptor);
   free(access_str);
 }
diff --git a/runtime/native/sun_misc_Unsafe.cc b/runtime/native/sun_misc_Unsafe.cc
index e9c5af0..5014f34 100644
--- a/runtime/native/sun_misc_Unsafe.cc
+++ b/runtime/native/sun_misc_Unsafe.cc
@@ -230,7 +230,7 @@
 static jlong Unsafe_allocateMemory(JNIEnv* env, jobject, jlong bytes) {
   ScopedFastNativeObjectAccess soa(env);
   // bytes is nonnegative and fits into size_t
-  if (bytes < 0 || bytes != static_cast<jlong>(static_cast<size_t>(bytes))) {
+  if (bytes < 0 || bytes != (jlong)(size_t) bytes) {
     ThrowIllegalAccessException("wrong number of bytes");
     return 0;
   }
@@ -311,11 +311,11 @@
     return;
   }
   // size is nonnegative and fits into size_t
-  if (size < 0 || size != static_cast<jlong>(static_cast<size_t>(size))) {
+  if (size < 0 || size != (jlong)(size_t) size) {
     ScopedFastNativeObjectAccess soa(env);
     ThrowIllegalAccessException("wrong number of bytes");
   }
-  size_t sz = static_cast<size_t>(size);
+  size_t sz = (size_t)size;
   memcpy(reinterpret_cast<void *>(dst), reinterpret_cast<void *>(src), sz);
 }
 
@@ -358,11 +358,11 @@
     return;
   }
   // size is nonnegative and fits into size_t
-  if (size < 0 || size != static_cast<jlong>(static_cast<size_t>(size))) {
+  if (size < 0 || size != (jlong)(size_t) size) {
     ThrowIllegalAccessException("wrong number of bytes");
   }
-  size_t sz = static_cast<size_t>(size);
-  size_t dst_offset = static_cast<size_t>(dstOffset);
+  size_t sz = (size_t)size;
+  size_t dst_offset = (size_t)dstOffset;
   ObjPtr<mirror::Object> dst = soa.Decode<mirror::Object>(dstObj);
   ObjPtr<mirror::Class> component_type = dst->GetClass()->GetComponentType();
   if (component_type->IsPrimitiveByte() || component_type->IsPrimitiveBoolean()) {
@@ -393,11 +393,11 @@
     return;
   }
   // size is nonnegative and fits into size_t
-  if (size < 0 || size != static_cast<jlong>(static_cast<size_t>(size))) {
+  if (size < 0 || size != (jlong)(size_t) size) {
     ThrowIllegalAccessException("wrong number of bytes");
   }
-  size_t sz = static_cast<size_t>(size);
-  size_t src_offset = static_cast<size_t>(srcOffset);
+  size_t sz = (size_t)size;
+  size_t src_offset = (size_t)srcOffset;
   ObjPtr<mirror::Object> src = soa.Decode<mirror::Object>(srcObj);
   ObjPtr<mirror::Class> component_type = src->GetClass()->GetComponentType();
   if (component_type->IsPrimitiveByte() || component_type->IsPrimitiveBoolean()) {
diff --git a/tools/dmtracedump/tracedump.cc b/tools/dmtracedump/tracedump.cc
index 3cb7374..42527c5 100644
--- a/tools/dmtracedump/tracedump.cc
+++ b/tools/dmtracedump/tracedump.cc
@@ -849,7 +849,7 @@
     return nullptr;
   }
 
-  if (fread(pKeys->fileData, 1, pKeys->fileLen, fp) != static_cast<size_t>(pKeys->fileLen)) {
+  if (fread(pKeys->fileData, 1, pKeys->fileLen, fp) != (size_t)pKeys->fileLen) {
     fprintf(stderr, "ERROR: unable to read %" PRIu64 " bytes from trace file\n", pKeys->fileLen);
     freeDataKeys(pKeys);
     return nullptr;