Fix cpplint whitespace/newline issues

Change-Id: Ie2049d9f667339e41f36c4f5d09f0d10d8d2c762
diff --git a/Android.mk b/Android.mk
index ebebc61..27bd894 100644
--- a/Android.mk
+++ b/Android.mk
@@ -334,7 +334,7 @@
 .PHONY: cpplint-art
 cpplint-art:
 	./art/tools/cpplint.py \
-	    --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit \
+	    --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit,+whitespace/newline \
 	    $(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION))
 
 # "mm cpplint-art-aspirational" to see warnings we would like to fix
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index 2d7c973..0803914 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -223,11 +223,14 @@
   { // NOLINT(whitespace/braces)
     switch (compiler.GetInstructionSet()) {
       case kThumb2:
-        cu->cg.reset(ArmCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break;
+        cu->cg.reset(ArmCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena));
+        break;
       case kMips:
-        cu->cg.reset(MipsCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break;
+        cu->cg.reset(MipsCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena));
+        break;
       case kX86:
-        cu->cg.reset(X86CodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break;
+        cu->cg.reset(X86CodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena));
+        break;
       default:
         LOG(FATAL) << "Unexpected instruction set: " << compiler.GetInstructionSet();
     }
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index e728d27..e169dc8 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -61,7 +61,7 @@
 
 void Mir2Lir::SetMemRefType(LIR* lir, bool is_load, int mem_type) {
   uint64_t *mask_ptr;
-  uint64_t mask = ENCODE_MEM;;
+  uint64_t mask = ENCODE_MEM;
   DCHECK(GetTargetInstFlags(lir->opcode) & (IS_LOAD | IS_STORE));
   if (is_load) {
     mask_ptr = &lir->use_mask;
diff --git a/compiler/dex/quick/mips/utility_mips.cc b/compiler/dex/quick/mips/utility_mips.cc
index 1975d1a..8510006 100644
--- a/compiler/dex/quick/mips/utility_mips.cc
+++ b/compiler/dex/quick/mips/utility_mips.cc
@@ -208,8 +208,7 @@
     case kOpAdd:
       if (IS_SIMM16(value)) {
         opcode = kMipsAddiu;
-      }
-      else {
+      } else {
         short_form = false;
         opcode = kMipsAddu;
       }
@@ -218,8 +217,7 @@
       if (IS_SIMM16((-value))) {
         value = -value;
         opcode = kMipsAddiu;
-      }
-      else {
+      } else {
         short_form = false;
         opcode = kMipsSubu;
       }
@@ -239,8 +237,7 @@
     case kOpAnd:
       if (IS_UIMM16((value))) {
         opcode = kMipsAndi;
-      }
-      else {
+      } else {
         short_form = false;
         opcode = kMipsAnd;
       }
@@ -248,8 +245,7 @@
     case kOpOr:
       if (IS_UIMM16((value))) {
         opcode = kMipsOri;
-      }
-      else {
+      } else {
         short_form = false;
         opcode = kMipsOr;
       }
@@ -257,8 +253,7 @@
     case kOpXor:
       if (IS_UIMM16((value))) {
         opcode = kMipsXori;
-      }
-      else {
+      } else {
         short_form = false;
         opcode = kMipsXor;
       }
diff --git a/compiler/llvm/md_builder.cc b/compiler/llvm/md_builder.cc
index 3884f51..1bd76dd 100644
--- a/compiler/llvm/md_builder.cc
+++ b/compiler/llvm/md_builder.cc
@@ -33,17 +33,33 @@
   ::llvm::MDNode*& spec_ty = tbaa_special_type_[sty_id];
   if (spec_ty == NULL) {
     switch (sty_id) {
-    case kTBAARegister:     spec_ty = createTBAANode("Register", tbaa_root_); break;
-    case kTBAAStackTemp:    spec_ty = createTBAANode("StackTemp", tbaa_root_); break;
-    case kTBAAHeapArray:    spec_ty = createTBAANode("HeapArray", tbaa_root_); break;
-    case kTBAAHeapInstance: spec_ty = createTBAANode("HeapInstance", tbaa_root_); break;
-    case kTBAAHeapStatic:   spec_ty = createTBAANode("HeapStatic", tbaa_root_); break;
-    case kTBAAJRuntime:     spec_ty = createTBAANode("JRuntime", tbaa_root_); break;
-    case kTBAARuntimeInfo:  spec_ty = createTBAANode("RuntimeInfo",
-                                                     GetTBAASpecialType(kTBAAJRuntime)); break;
-    case kTBAAShadowFrame:  spec_ty = createTBAANode("ShadowFrame",
-                                                     GetTBAASpecialType(kTBAAJRuntime)); break;
-    case kTBAAConstJObject: spec_ty = createTBAANode("ConstJObject", tbaa_root_, true); break;
+    case kTBAARegister:
+      spec_ty = createTBAANode("Register", tbaa_root_);
+      break;
+    case kTBAAStackTemp:
+      spec_ty = createTBAANode("StackTemp", tbaa_root_);
+      break;
+    case kTBAAHeapArray:
+      spec_ty = createTBAANode("HeapArray", tbaa_root_);
+      break;
+    case kTBAAHeapInstance:
+      spec_ty = createTBAANode("HeapInstance", tbaa_root_);
+      break;
+    case kTBAAHeapStatic:
+      spec_ty = createTBAANode("HeapStatic", tbaa_root_);
+      break;
+    case kTBAAJRuntime:
+      spec_ty = createTBAANode("JRuntime", tbaa_root_);
+      break;
+    case kTBAARuntimeInfo:
+      spec_ty = createTBAANode("RuntimeInfo", GetTBAASpecialType(kTBAAJRuntime));
+      break;
+    case kTBAAShadowFrame:
+      spec_ty = createTBAANode("ShadowFrame", GetTBAASpecialType(kTBAAJRuntime));
+      break;
+    case kTBAAConstJObject:
+      spec_ty = createTBAANode("ConstJObject", tbaa_root_, true);
+      break;
     default:
       LOG(FATAL) << "Unknown TBAA special type: " << sty_id;
       break;
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index 2c6b6a8..bf19e8d 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -87,14 +87,28 @@
     std::string spec(specs[i]);
     if (spec.size() == 3 && StartsWith(spec, "*:")) {
       switch (spec[2]) {
-        case 'v': gMinimumLogSeverity = VERBOSE; continue;
-        case 'd': gMinimumLogSeverity = DEBUG; continue;
-        case 'i': gMinimumLogSeverity = INFO; continue;
-        case 'w': gMinimumLogSeverity = WARNING; continue;
-        case 'e': gMinimumLogSeverity = ERROR; continue;
-        case 'f': gMinimumLogSeverity = FATAL; continue;
+        case 'v':
+          gMinimumLogSeverity = VERBOSE;
+          continue;
+        case 'd':
+          gMinimumLogSeverity = DEBUG;
+          continue;
+        case 'i':
+          gMinimumLogSeverity = INFO;
+          continue;
+        case 'w':
+          gMinimumLogSeverity = WARNING;
+          continue;
+        case 'e':
+          gMinimumLogSeverity = ERROR;
+          continue;
+        case 'f':
+          gMinimumLogSeverity = FATAL;
+          continue;
         // liblog will even suppress FATAL if you say 's' for silent, but that's crazy!
-        case 's': gMinimumLogSeverity = FATAL; continue;
+        case 's':
+          gMinimumLogSeverity = FATAL;
+          continue;
       }
     }
     LOG(FATAL) << "unsupported '" << spec << "' in ANDROID_LOG_TAGS (" << tags << ")";
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 94f3cbe..28a2c60 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -238,7 +238,7 @@
   static JDWP::JdwpTag GetFieldBasicTag(JDWP::FieldId field_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::JdwpTag GetStaticFieldBasicTag(JDWP::FieldId field_id)
-      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);;
+      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::JdwpError GetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id,
                                        JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 85b7bf0..deb1b8c 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -1538,7 +1538,7 @@
           gc_complete_cond_->Wait(self);
         }
         last_gc_type = last_gc_type_;
-        wait_time = NanoTime() - wait_start;;
+        wait_time = NanoTime() - wait_start;
         total_wait_time_ += wait_time;
       }
       if (wait_time > kLongGcPauseThreshold) {
diff --git a/runtime/runtime_support.h b/runtime/runtime_support.h
index 051981f..a6c3b38 100644
--- a/runtime/runtime_support.h
+++ b/runtime/runtime_support.h
@@ -176,8 +176,12 @@
     case StaticObjectWrite:      is_primitive = false; is_set = true;  is_static = true;  break;
     case StaticPrimitiveRead:    is_primitive = true;  is_set = false; is_static = true;  break;
     case StaticPrimitiveWrite:   is_primitive = true;  is_set = true;  is_static = true;  break;
-    default: LOG(FATAL) << "UNREACHABLE";  // Assignment below to avoid GCC warnings.
-             is_primitive = true;  is_set = true;  is_static = true;  break;
+    default:
+      LOG(FATAL) << "UNREACHABLE";  // Assignment below to avoid GCC warnings.
+      is_primitive = true;
+      is_set = true;
+      is_static = true;
+      break;
   }
   if (UNLIKELY(resolved_field->IsStatic() != is_static)) {
     // Incompatible class change.
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 6114c63..dd55195 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1703,7 +1703,11 @@
 void Thread::DumpThreadOffset(std::ostream& os, uint32_t offset, size_t size_of_pointers) {
   CHECK_EQ(size_of_pointers, 4U); // TODO: support 64-bit targets.
 
-#define DO_THREAD_OFFSET(x) if (offset == static_cast<uint32_t>(OFFSETOF_VOLATILE_MEMBER(Thread, x))) { os << # x; return; }
+#define DO_THREAD_OFFSET(x) \
+    if (offset == static_cast<uint32_t>(OFFSETOF_VOLATILE_MEMBER(Thread, x))) { \
+      os << # x; \
+      return; \
+    }
   DO_THREAD_OFFSET(state_and_flags_);
   DO_THREAD_OFFSET(card_table_);
   DO_THREAD_OFFSET(exception_);