Bug 1511319 - Ensure that tools/clang-tidy/test doesn't get reformatted using clang-format; r=sylvestre a=Aryx
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 30 Nov 2018 06:32:29 -0500
changeset 508165 3acb179a17592b5f9a64cb30e0c6554b640d0a46
parent 508164 4a8721265f7ea0b2548cdc6a38e7a7484f376665
child 508166 bf92aff5b93de1726b12207adc54dd138178250d
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre, Aryx
bugs1511319
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1511319 - Ensure that tools/clang-tidy/test doesn't get reformatted using clang-format; r=sylvestre a=Aryx Reformatting this directory can break some of the tests here. Differential Revision: https://phabricator.services.mozilla.com/D13518
.clang-format-ignore
tools/clang-tidy/test/bugprone-argument-comment.cpp
tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.cpp
tools/clang-tidy/test/bugprone-forward-declaration-namespace.cpp
tools/clang-tidy/test/bugprone-incorrect-roundings.cpp
tools/clang-tidy/test/bugprone-integer-division.cpp
tools/clang-tidy/test/bugprone-macro-parentheses.cpp
tools/clang-tidy/test/bugprone-macro-repeated-side-effects.cpp
tools/clang-tidy/test/bugprone-misplaced-widening-cast.cpp
tools/clang-tidy/test/bugprone-multiple-statement-macro.cpp
tools/clang-tidy/test/bugprone-string-constructor.cpp
tools/clang-tidy/test/bugprone-string-integer-assignment.cpp
tools/clang-tidy/test/bugprone-suspicious-memset-usage.cpp
tools/clang-tidy/test/bugprone-suspicious-missing-comma.cpp
tools/clang-tidy/test/bugprone-suspicious-semicolon.cpp
tools/clang-tidy/test/bugprone-suspicious-string-compare.cpp
tools/clang-tidy/test/bugprone-swapped-arguments.cpp
tools/clang-tidy/test/bugprone-unused-raii.cpp
tools/clang-tidy/test/bugprone-use-after-move.cpp
tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
tools/clang-tidy/test/clang-analyzer-core.NonNullParamChecker.cpp
tools/clang-tidy/test/clang-analyzer-core.NullDereference.cpp
tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.cpp
tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.cpp
tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.cpp
tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.rand.cpp
tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.cpp
tools/clang-tidy/test/clang-analyzer-unix.Malloc.cpp
tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.cpp
tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.cpp
tools/clang-tidy/test/misc-non-copyable-objects.cpp
tools/clang-tidy/test/misc-unused-alias-decls.cpp
tools/clang-tidy/test/misc-unused-using-decls.cpp
tools/clang-tidy/test/modernize-avoid-bind.cpp
tools/clang-tidy/test/modernize-redundant-void-arg.cpp
tools/clang-tidy/test/modernize-use-auto.cpp
tools/clang-tidy/test/modernize-use-equals-default.cpp
tools/clang-tidy/test/modernize-use-equals-delete.cpp
tools/clang-tidy/test/modernize-use-nullptr.cpp
tools/clang-tidy/test/modernize-use-override.cpp
tools/clang-tidy/test/performance-for-range-copy.cpp
tools/clang-tidy/test/performance-implicit-conversion-in-loop.cpp
tools/clang-tidy/test/performance-inefficient-algorithm.cpp
tools/clang-tidy/test/performance-inefficient-vector-operation.cpp
tools/clang-tidy/test/performance-move-const-arg.cpp
tools/clang-tidy/test/performance-move-constructor-init.cpp
tools/clang-tidy/test/performance-type-promotion-in-math-fn.cpp
tools/clang-tidy/test/performance-unnecessary-copy-initialization.cpp
tools/clang-tidy/test/performance-unnecessary-value-param.cpp
tools/clang-tidy/test/readability-braces-around-statements.cpp
tools/clang-tidy/test/readability-container-size-empty.cpp
tools/clang-tidy/test/readability-else-after-return.cpp
tools/clang-tidy/test/readability-implicit-bool-conversion.cpp
tools/clang-tidy/test/readability-inconsistent-declaration-parameter-name.cpp
tools/clang-tidy/test/readability-misleading-indentation.cpp
tools/clang-tidy/test/readability-redundant-smartptr-get.cpp
tools/clang-tidy/test/readability-redundant-string-init.cpp
tools/clang-tidy/test/readability-static-accessed-through-instance.cpp
tools/clang-tidy/test/structures.h
--- a/.clang-format-ignore
+++ b/.clang-format-ignore
@@ -57,16 +57,20 @@ intl/unicharutil/util/nsUnicodeScriptCod
 media/mp4parse-rust/mp4parse.h
 widget/gtk/wayland/gtk-primary-selection-client-protocol.h
 widget/gtk/wayland/gtk-primary-selection-protocol.c
 
 # Ignored because these files are used to generate a windows.h STL wrapper,
 # and reformatting them can break generating that wrapper.
 config/windows-h-.*.h
 
+# Exclude tools/clang-tidy/test from automatic reformatting, since it can
+# break some of the tests in that directory.
+tools/clang-tidy/test/.*
+
 # The XPTCall stubs files have some inline assembly macros
 # that get reformatted badly. See bug 1510781.
 xpcom/reflect/xptcall/md/win32/.*
 xpcom/reflect/xptcall/md/unix/.*
 
 # Generated from ./tools/rewriting/ThirdPartyPaths.txt
 # awk '{print ""$1".*"}' ./tools/rewriting/ThirdPartyPaths.txt
 browser/components/translation/cld2/.*
--- a/tools/clang-tidy/test/bugprone-argument-comment.cpp
+++ b/tools/clang-tidy/test/bugprone-argument-comment.cpp
@@ -1,4 +1,6 @@
 // bugprone-argument-comment
 
 void f(int x, int y);
-void g() { f(/*y=*/0, /*z=*/0); }
+void g() {
+  f(/*y=*/0, /*z=*/0);
+}
--- a/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.cpp
+++ b/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.cpp
@@ -1,19 +1,20 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-bool-pointer-implicit-conversion.html
 
-bool test(bool* pointer_to_bool, int* pointer_to_int) {
-  if (pointer_to_bool) {  // warning for pointer to bool
+bool test(bool* pointer_to_bool, int* pointer_to_int)
+{
+  if (pointer_to_bool) { // warning for pointer to bool
   }
 
-  if (pointer_to_int) {  // no warning for pointer to int
+  if (pointer_to_int) { // no warning for pointer to int
   }
 
-  if (!pointer_to_bool) {  // no warning, but why not??
+  if (!pointer_to_bool) { // no warning, but why not??
   }
 
-  if (pointer_to_bool != nullptr) {  // no warning for nullptr comparison
+  if (pointer_to_bool != nullptr) { // no warning for nullptr comparison
   }
 
   // no warning on return, but why not??
   // clang-tidy bug: https://bugs.llvm.org/show_bug.cgi?id=38060
   return pointer_to_bool;
 }
--- a/tools/clang-tidy/test/bugprone-forward-declaration-namespace.cpp
+++ b/tools/clang-tidy/test/bugprone-forward-declaration-namespace.cpp
@@ -1,7 +1,3 @@
-namespace na {
-struct A;
-}
-namespace nb {
-struct A {};
-}  // namespace nb
+namespace na { struct A; }
+namespace nb { struct A {}; }
 nb::A a;
--- a/tools/clang-tidy/test/bugprone-incorrect-roundings.cpp
+++ b/tools/clang-tidy/test/bugprone-incorrect-roundings.cpp
@@ -1,6 +1,7 @@
-void f1() {
+void f1()
+{
   double d;
   int x;
 
   x = (d + 0.5);
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-integer-division.cpp
+++ b/tools/clang-tidy/test/bugprone-integer-division.cpp
@@ -1,5 +1,5 @@
 float f() {
   int a = 2;
   int b = 10;
-  return a / b;
+  return a/b;
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-macro-parentheses.cpp
+++ b/tools/clang-tidy/test/bugprone-macro-parentheses.cpp
@@ -1,5 +1,5 @@
-#define BAD1 -1
-#define BAD2 1 + 2
-#define BAD3(A) (A + 1)
-#define BAD4(x) ((unsigned char)(x & 0xff))
-#define BAD5(X) A* B = (C*)X + 2
\ No newline at end of file
+#define BAD1              -1
+#define BAD2              1+2
+#define BAD3(A)           (A+1)
+#define BAD4(x)           ((unsigned char)(x & 0xff))
+#define BAD5(X) A*B=(C*)X+2
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.cpp
+++ b/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.cpp
@@ -1,26 +1,28 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-repeated-side-effects.html
 
 #define MACRO_WITHOUT_REPEATED_ARG(x) (x)
 #define MACRO_WITH_REPEATED_ARG(x) ((x) + (x))
 
 static int g;
 
-int function_with_side_effects(int i) {
+int function_with_side_effects(int i)
+{
   g += i;
   return g;
 }
 
-void test() {
+void test()
+{
   int i;
-  i = MACRO_WITHOUT_REPEATED_ARG(1);  // OK
-  i = MACRO_WITH_REPEATED_ARG(1);     // OK
+  i = MACRO_WITHOUT_REPEATED_ARG(1); // OK
+  i = MACRO_WITH_REPEATED_ARG(1); // OK
 
-  i = MACRO_WITHOUT_REPEATED_ARG(i);  // OK
-  i = MACRO_WITH_REPEATED_ARG(i);     // OK
+  i = MACRO_WITHOUT_REPEATED_ARG(i); // OK
+  i = MACRO_WITH_REPEATED_ARG(i); // OK
 
-  i = MACRO_WITHOUT_REPEATED_ARG(function_with_side_effects(i));  // OK
-  i = MACRO_WITH_REPEATED_ARG(function_with_side_effects(i));     // NO WARNING
+  i = MACRO_WITHOUT_REPEATED_ARG(function_with_side_effects(i)); // OK
+  i = MACRO_WITH_REPEATED_ARG(function_with_side_effects(i)); // NO WARNING
 
-  i = MACRO_WITHOUT_REPEATED_ARG(i++);  // OK
-  i = MACRO_WITH_REPEATED_ARG(i++);     // WARNING
+  i = MACRO_WITHOUT_REPEATED_ARG(i++); // OK
+  i = MACRO_WITH_REPEATED_ARG(i++); // WARNING
 }
--- a/tools/clang-tidy/test/bugprone-misplaced-widening-cast.cpp
+++ b/tools/clang-tidy/test/bugprone-misplaced-widening-cast.cpp
@@ -1,1 +1,3 @@
-long f(int x) { return (long)(x * 1000); }
\ No newline at end of file
+long f(int x) {
+    return (long)(x * 1000);
+}
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-multiple-statement-macro.cpp
+++ b/tools/clang-tidy/test/bugprone-multiple-statement-macro.cpp
@@ -1,9 +1,10 @@
 void F();
 
 #define BAD_MACRO(x) \
   F();               \
   F()
 
 void positives() {
-  if (1) BAD_MACRO(1);
+  if (1)
+    BAD_MACRO(1);
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-string-constructor.cpp
+++ b/tools/clang-tidy/test/bugprone-string-constructor.cpp
@@ -1,16 +1,17 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-constructor.html
 
 #include "structures.h"
 
-void test() {
+void test()
+{
   // A common mistake is to swap parameters to the ‘fill’ string-constructor.
-  std::string str('x', 50);  // should be str(50, 'x')
+  std::string str('x', 50); // should be str(50, 'x')
 
   // Calling the string-literal constructor with a length bigger than the
   // literal is suspicious and adds extra random characters to the string.
-  std::string("test", 200);  // Will include random characters after "test".
+  std::string("test", 200);   // Will include random characters after "test".
 
   // Creating an empty string from constructors with parameters is considered
   // suspicious. The programmer should use the empty constructor instead.
-  std::string("test", 0);  // Creation of an empty string.
+  std::string("test", 0);   // Creation of an empty string.
 }
--- a/tools/clang-tidy/test/bugprone-string-integer-assignment.cpp
+++ b/tools/clang-tidy/test/bugprone-string-integer-assignment.cpp
@@ -1,25 +1,28 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-integer-assignment.html
 
 #include "structures.h"
 
-void test_int() {
+void test_int()
+{
   // Numeric types can be implicitly casted to character types.
   std::string s;
   int x = 5965;
-  s = 6;  // warning
-  s = x;  // warning
+  s = 6; // warning
+  s = x; // warning
 }
 
-void test_conversion() {
+void test_conversion()
+{
   // Use the appropriate conversion functions or character literals.
   std::string s;
   int x = 5965;
-  s = '6';                // OK
-  s = std::to_string(x);  // OK
+  s = '6'; // OK
+  s = std::to_string(x); // OK
 }
 
-void test_cast() {
+void test_cast()
+{
   // In order to suppress false positives, use an explicit cast.
   std::string s;
-  s = static_cast<char>(6);  // OK
+  s = static_cast<char>(6); // OK
 }
--- a/tools/clang-tidy/test/bugprone-suspicious-memset-usage.cpp
+++ b/tools/clang-tidy/test/bugprone-suspicious-memset-usage.cpp
@@ -1,21 +1,22 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-memset-usage.html
 
 #include "structures.h"
 
-void test(int* ip, char* cp) {
+void test(int* ip, char* cp)
+{
   // Case 1: Fill value is a character '0' instead of NUL '\0'.
-  memset(ip, '0', 1);  // WARNING: suspicious for non-char pointers
-  memset(cp, '0', 1);  // OK for char pointers
+  memset(ip, '0', 1); // WARNING: suspicious for non-char pointers
+  memset(cp, '0', 1); // OK for char pointers
 
   // Case 2: Fill value is truncated.
-  memset(ip, 0xabcd, 1);  // WARNING: fill value gets truncated
-  memset(ip, 0x00cd, 1);  // OK because value 0xcd is not truncated.
-  memset(ip, 0x00, 1);    // OK because value is not truncated.
+  memset(ip, 0xabcd, 1); // WARNING: fill value gets truncated
+  memset(ip, 0x00cd, 1); // OK because value 0xcd is not truncated.
+  memset(ip, 0x00, 1);   // OK because value is not truncated.
 
   // Case 3: Byte count is zero.
-  memset(ip, sizeof(int), 0);  // WARNING: zero length, potentially swapped
-  memset(ip, sizeof(int), 1);  // OK with non-zero length
+  memset(ip, sizeof(int), 0); // WARNING: zero length, potentially swapped
+  memset(ip, sizeof(int), 1); // OK with non-zero length
 
   // See clang bug https://bugs.llvm.org/show_bug.cgi?id=38098
-  memset(ip, 8, 0);  // OK with zero length without sizeof
+  memset(ip, 8, 0); // OK with zero length without sizeof
 }
--- a/tools/clang-tidy/test/bugprone-suspicious-missing-comma.cpp
+++ b/tools/clang-tidy/test/bugprone-suspicious-missing-comma.cpp
@@ -1,9 +1,9 @@
 const char* Cartoons[] = {
-    "Bugs Bunny",
-    "Homer Simpson",
-    "Mickey Mouse",
-    "Bart Simpson",
-    "Charlie Brown"  // There is a missing comma here.
-    "Fred Flintstone",
-    "Popeye",
+  "Bugs Bunny",
+  "Homer Simpson",
+  "Mickey Mouse",
+  "Bart Simpson",
+  "Charlie Brown"  // There is a missing comma here.
+  "Fred Flintstone",
+  "Popeye",
 };
--- a/tools/clang-tidy/test/bugprone-suspicious-semicolon.cpp
+++ b/tools/clang-tidy/test/bugprone-suspicious-semicolon.cpp
@@ -1,9 +1,8 @@
 
 // bugprone-suspicious-semicolon
 void nop();
-void fail1() {
-  int x = 0;
-  if (x > 5)
-    ;
-  nop();
+void fail1()
+{
+    int x = 0;
+    if(x > 5); nop();
 }
--- a/tools/clang-tidy/test/bugprone-suspicious-string-compare.cpp
+++ b/tools/clang-tidy/test/bugprone-suspicious-string-compare.cpp
@@ -1,7 +1,8 @@
 static const char A[] = "abc";
 
 int strcmp(const char *, const char *);
 
 int test_warning_patterns() {
-  if (strcmp(A, "a")) return 0;
+  if (strcmp(A, "a"))
+    return 0;
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/bugprone-swapped-arguments.cpp
+++ b/tools/clang-tidy/test/bugprone-swapped-arguments.cpp
@@ -1,25 +1,26 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-swapped-arguments.html
 
 void test_d_i(double d, int i);
 void test_d_i_i(double d, int i, int ii);
 void test_i_d(int i, double d);
 void test_i_i_d(int i, int ii, double d);
 
-void test() {
+void test()
+{
   double d = 1;
   int i = 1;
 
-  test_d_i(d, i);  // OK
-  test_d_i(i, d);  // WARNING
+  test_d_i(d, i); // OK
+  test_d_i(i, d); // WARNING
 
-  test_i_d(i, d);  // OK
-  test_i_d(d, i);  // WARNING
+  test_i_d(i, d); // OK
+  test_i_d(d, i); // WARNING
 
-  test_i_i_d(i, i, d);  // OK
-  test_i_i_d(i, d, i);  // WARNING
-  test_i_i_d(d, i, i);  // NO WARNING after second parameter
+  test_i_i_d(i, i, d); // OK
+  test_i_i_d(i, d, i); // WARNING
+  test_i_i_d(d, i, i); // NO WARNING after second parameter
 
-  test_d_i_i(d, i, i);  // OK
-  test_d_i_i(i, d, i);  // WARNING
-  test_d_i_i(i, i, d);  // NO WARNING after second parameter
+  test_d_i_i(d, i, i); // OK
+  test_d_i_i(i, d, i); // WARNING
+  test_d_i_i(i, i, d); // NO WARNING after second parameter
 }
--- a/tools/clang-tidy/test/bugprone-unused-raii.cpp
+++ b/tools/clang-tidy/test/bugprone-unused-raii.cpp
@@ -1,22 +1,25 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html
 
-struct scoped_lock {
+struct scoped_lock
+{
   scoped_lock() {}
   ~scoped_lock() {}
 };
 
 #define SCOPED_LOCK_MACRO(m) scoped_lock()
 
-struct trivial_scoped_lock {
+struct trivial_scoped_lock
+{
   trivial_scoped_lock() {}
 };
 
-scoped_lock test() {
-  scoped_lock();  // misc-unused-raii warning!
-
-  SCOPED_LOCK_MACRO();  // no warning for macros
+scoped_lock test()
+{
+  scoped_lock(); // misc-unused-raii warning!
 
-  trivial_scoped_lock();  // no warning for trivial objects without destructors
+  SCOPED_LOCK_MACRO(); // no warning for macros
 
-  return scoped_lock();  // no warning for return values
+  trivial_scoped_lock(); // no warning for trivial objects without destructors
+
+  return scoped_lock(); // no warning for return values
 }
--- a/tools/clang-tidy/test/bugprone-use-after-move.cpp
+++ b/tools/clang-tidy/test/bugprone-use-after-move.cpp
@@ -4,17 +4,17 @@ typedef unsigned size_t;
 template <typename T>
 struct unique_ptr {
   unique_ptr();
   T *get() const;
   explicit operator bool() const;
   void reset(T *ptr);
   T &operator*() const;
   T *operator->() const;
-  T &operator[](size_t i) const;
+  T& operator[](size_t i) const;
 };
 
 template <typename>
 struct remove_reference;
 
 template <typename _Tp>
 struct remove_reference {
   typedef _Tp type;
@@ -29,20 +29,20 @@ template <typename _Tp>
 struct remove_reference<_Tp &&> {
   typedef _Tp type;
 };
 
 template <typename _Tp>
 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) noexcept {
   return static_cast<typename remove_reference<_Tp>::type &&>(__t);
 }
-}  // namespace std
+}
 
 class A {
- public:
+public:
   A();
   A(const A &);
   A(A &&);
 
   A &operator=(const A &);
   A &operator=(A &&);
 
   void foo() const;
--- a/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
@@ -1,3 +1,4 @@
 void test(int z) {
-  if (z == 0) int x = 1 / z;
+  if (z == 0)
+    int x = 1 / z;
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/clang-analyzer-core.NonNullParamChecker.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-core.NonNullParamChecker.cpp
@@ -1,5 +1,6 @@
 int f(int *p) __attribute__((nonnull));
 
 void test(int *p) {
-  if (!p) f(p);  // warn
+  if (!p)
+    f(p); // warn
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/clang-analyzer-core.NullDereference.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-core.NullDereference.cpp
@@ -1,9 +1,9 @@
 class C {
- public:
+public:
   int x;
 };
 
 void test() {
   C *pc = 0;
   int k = pc->x;
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.cpp
@@ -1,44 +1,50 @@
 // https://clang-analyzer.llvm.org/available_checks.html
 
 void use(int *p);
 
-void test_use_parameter_after_delete(int *p) {
+void test_use_parameter_after_delete(int *p)
+{
   delete p;
-  use(p);  // warning: use after free
+  use(p); // warning: use after free
 }
 
 class SomeClass {
- public:
+public:
   void f();
 };
 
-void test_use_local_after_delete() {
+void test_use_local_after_delete()
+{
   SomeClass *c = new SomeClass;
   delete c;
-  c->f();  // warning: use after free
+  c->f(); // warning: use after free
 }
 
 // XXX clang documentation says this should cause a warning but it doesn't!
-void test_delete_alloca() {
+void test_delete_alloca()
+{
   int *p = (int *)__builtin_alloca(sizeof(int));
-  delete p;  // NO warning: deleting memory allocated by alloca
+  delete p; // NO warning: deleting memory allocated by alloca
 }
 
-void test_double_free() {
+void test_double_free()
+{
   int *p = new int;
   delete p;
-  delete p;  // warning: attempt to free released
+  delete p; // warning: attempt to free released
 }
 
-void test_delete_local() {
+void test_delete_local()
+{
   int i;
-  delete &i;  // warning: delete address of local
+  delete &i; // warning: delete address of local
 }
 
 // XXX clang documentation says this should cause a warning but it doesn't!
-void test_delete_offset() {
+void test_delete_offset()
+{
   int *p = new int[1];
-  delete[](++p);
-  // NO warning: argument to 'delete[]' is offset by 4 bytes
-  // from the start of memory allocated by 'new[]'
+  delete[] (++p);
+    // NO warning: argument to 'delete[]' is offset by 4 bytes
+    // from the start of memory allocated by 'new[]'
 }
--- a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.cpp
@@ -1,3 +1,6 @@
 // https://clang-analyzer.llvm.org/available_checks.html
 
-void test() { int *p = new int; }  // warning
+void test()
+{
+  int *p = new int;
+} // warning
--- a/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.cpp
@@ -1,6 +1,7 @@
 
 // clang-analyzer-deadcode.DeadStores
 void test() {
   int x;
-  x = 1;  // warn
+  x = 1; // warn
 }
+
--- a/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.cpp
@@ -1,4 +1,3 @@
 void test() {
-  for (float x = 0.1f; x <= 1.0f; x += 0.1f) {
-  }
+  for (float x = 0.1f; x <= 1.0f; x += 0.1f) {}
 }
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-void test() { setuid(1); }
+void test() {
+  setuid(1);
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-int test_bcmp(void *a, void *b, size_t n) { return bcmp(a, b, n); }
+int test_bcmp(void *a, void *b, size_t n) {
+  return bcmp(a, b, n);
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-void test_bcopy(void *a, void *b, size_t n) { bcopy(a, b, n); }
+void test_bcopy(void *a, void *b, size_t n) {
+  bcopy(a, b, n);
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.cpp
@@ -1,3 +1,6 @@
 #include "structures.h"
 
-void test_bzero(void *a, size_t n) { bzero(a, n); }
+void test_bzero(void *a, size_t n) {
+  bzero(a, n);
+}
+
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-void test() { mkstemp("XX"); }
+void test() {
+  mkstemp("XX");
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-void test() { char *x = mktemp("/tmp/zxcv"); }
+void test() {
+  char *x = mktemp("/tmp/zxcv");
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.rand.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.rand.cpp
@@ -1,2 +1,4 @@
 #include <stdlib.h>
-void test() { random(); }
+void test() {
+  random();
+}
--- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-void test() { vfork(); }
+void test() {
+  vfork();
+}
--- a/tools/clang-tidy/test/clang-analyzer-unix.Malloc.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-unix.Malloc.cpp
@@ -1,31 +1,37 @@
 // https://clang-analyzer.llvm.org/available_checks.html
 
 #include "structures.h"
 
-void test_malloc() {
-  int *p = (int *)malloc(1);
+void test_malloc()
+{
+  int *p = (int*) malloc(1);
   free(p);
-  free(p);  // warning: attempt to free released memory
+  free(p); // warning: attempt to free released memory
 }
 
-void test_use_after_free() {
-  int *p = (int *)malloc(sizeof(int));
+void test_use_after_free()
+{
+  int *p = (int*) malloc(sizeof(int));
   free(p);
-  *p = 1;  // warning: use after free
+  *p = 1; // warning: use after free
 }
 
-void test_leak() {
-  int *p = (int *)malloc(1);
-  if (p) return;  // warning: memory is never released
+void test_leak()
+{
+  int *p = (int*) malloc(1);
+  if (p)
+    return; // warning: memory is never released
 }
 
-void test_free_local() {
-  int a[] = {1};
-  free(a);  // warning: argument is not allocated by malloc
+void test_free_local()
+{
+  int a[] = { 1 };
+  free(a); // warning: argument is not allocated by malloc
 }
 
-void test_free_offset() {
-  int *p = (int *)malloc(sizeof(char));
+void test_free_offset()
+{
+  int *p = (int*) malloc(sizeof(char));
   p = p - 1;
-  free(p);  // warning: argument to free() is offset by -4 bytes
+  free(p); // warning: argument to free() is offset by -4 bytes
 }
--- a/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.cpp
@@ -1,8 +1,9 @@
 // https://clang-analyzer.llvm.org/available_checks.html
 
 #include "structures.h"
 
-void test() {
+void test()
+{
   char dest[3];
-  strncat(dest, "***", sizeof(dest));  // warning : potential buffer overflow
+  strncat(dest, "***", sizeof(dest)); // warning : potential buffer overflow
 }
--- a/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.cpp
+++ b/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.cpp
@@ -1,12 +1,14 @@
 // https://clang-analyzer.llvm.org/available_checks.html
 
 #include "structures.h"
 
-int my_strlen(const char* s) {
-  return strlen(s);  // warning
+int my_strlen(const char* s)
+{
+  return strlen(s); // warning
 }
 
-int bad_caller() {
+int bad_caller()
+{
   const char* s = nullptr;
   return my_strlen(s);
 }
--- a/tools/clang-tidy/test/misc-non-copyable-objects.cpp
+++ b/tools/clang-tidy/test/misc-non-copyable-objects.cpp
@@ -1,6 +1,5 @@
 namespace std {
-typedef struct FILE {
-} FILE;
-}  // namespace std
+typedef struct FILE {} FILE;
+}
 
 void g(std::FILE f);
\ No newline at end of file
--- a/tools/clang-tidy/test/misc-unused-alias-decls.cpp
+++ b/tools/clang-tidy/test/misc-unused-alias-decls.cpp
@@ -1,15 +1,18 @@
 // https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-alias-decls.html
 
 namespace n1 {
-namespace n2 {
-namespace n3 {
-int qux = 42;
+    namespace n2 {
+         namespace n3 {
+             int qux = 42;
+         }
+    }
 }
-}  // namespace n2
-}  // namespace n1
 
 namespace n1_unused = ::n1;     // WARNING
 namespace n12_unused = n1::n2;  // WARNING
 namespace n123 = n1::n2::n3;    // OK
 
-int test() { return n123::qux; }
+int test()
+{
+  return n123::qux;
+}
--- a/tools/clang-tidy/test/misc-unused-using-decls.cpp
+++ b/tools/clang-tidy/test/misc-unused-using-decls.cpp
@@ -1,6 +1,4 @@
 
 // misc-unused-using-decls
-namespace n {
-class C;
-}
+namespace n { class C; }
 using n::C;
--- a/tools/clang-tidy/test/modernize-avoid-bind.cpp
+++ b/tools/clang-tidy/test/modernize-avoid-bind.cpp
@@ -1,4 +1,6 @@
 #include "structures.h"
 
 int add(int x, int y) { return x + y; }
-void f_bind() { auto clj = std::bind(add, 2, 2); }
+void f_bind() {
+    auto clj = std::bind(add, 2, 2);
+}
--- a/tools/clang-tidy/test/modernize-redundant-void-arg.cpp
+++ b/tools/clang-tidy/test/modernize-redundant-void-arg.cpp
@@ -1,3 +1,5 @@
 // modernize-redundant-void-arg
 
-int foo(void) { return 0; }
+int foo(void) {
+    return 0;
+}
--- a/tools/clang-tidy/test/modernize-use-auto.cpp
+++ b/tools/clang-tidy/test/modernize-use-auto.cpp
@@ -1,10 +1,11 @@
 #include <vector>
 
 void func() {
   int val = 42;
   std::vector<int> my_container;
   for (std::vector<int>::iterator I = my_container.begin(),
                                   E = my_container.end();
-       I != E; ++I) {
+       I != E;
+       ++I) {
   }
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/modernize-use-equals-default.cpp
+++ b/tools/clang-tidy/test/modernize-use-equals-default.cpp
@@ -1,6 +1,6 @@
 
 class IL {
- public:
+public:
   IL() {}
   ~IL() {}
 };
--- a/tools/clang-tidy/test/modernize-use-equals-delete.cpp
+++ b/tools/clang-tidy/test/modernize-use-equals-delete.cpp
@@ -1,7 +1,7 @@
 struct PositivePrivate {
- private:
+private:
   PositivePrivate();
   PositivePrivate(const PositivePrivate &);
   PositivePrivate &operator=(PositivePrivate &&);
   ~PositivePrivate();
 };
--- a/tools/clang-tidy/test/modernize-use-nullptr.cpp
+++ b/tools/clang-tidy/test/modernize-use-nullptr.cpp
@@ -1,5 +1,5 @@
 #define NULL 0
 void f(void) {
-  char *str = NULL;  // ok
+  char *str = NULL; // ok
   (void)str;
 }
--- a/tools/clang-tidy/test/modernize-use-override.cpp
+++ b/tools/clang-tidy/test/modernize-use-override.cpp
@@ -1,8 +1,8 @@
 class Base {
- public:
+public:
   virtual void foo() = 0;
 };
 
 class Deriv : public Base {
   void foo();
 };
\ No newline at end of file
--- a/tools/clang-tidy/test/performance-for-range-copy.cpp
+++ b/tools/clang-tidy/test/performance-for-range-copy.cpp
@@ -1,17 +1,17 @@
 template <typename T>
 struct Iterator {
   void operator++() {}
-  const T &operator*() {
-    static T *TT = new T();
+  const T& operator*() {
+    static T* TT = new T();
     return *TT;
   }
   bool operator!=(const Iterator &) { return false; }
-  typedef const T &const_reference;
+  typedef const T& const_reference;
 };
 template <typename T>
 struct View {
   T begin() { return T(); }
   T begin() const { return T(); }
   T end() { return T(); }
   T end() const { return T(); }
   typedef typename T::const_reference const_reference;
--- a/tools/clang-tidy/test/performance-implicit-conversion-in-loop.cpp
+++ b/tools/clang-tidy/test/performance-implicit-conversion-in-loop.cpp
@@ -32,15 +32,12 @@ class OperatorWrapper {
 struct SimpleClass {
   int foo;
   operator OperatorWrapper<SimpleClass>();
 };
 
 typedef View<Iterator<SimpleClass>> SimpleView;
 
 void ImplicitSimpleClassIterator() {
-  for (const ImplicitWrapper<SimpleClass>& foo : SimpleView()) {
-  }
-  for (const ImplicitWrapper<SimpleClass> foo : SimpleView()) {
-  }
-  for (ImplicitWrapper<SimpleClass> foo : SimpleView()) {
-  }
+  for (const ImplicitWrapper<SimpleClass>& foo : SimpleView()) {}
+  for (const ImplicitWrapper<SimpleClass> foo : SimpleView()) {}
+  for (ImplicitWrapper<SimpleClass> foo : SimpleView()) {}
 }
--- a/tools/clang-tidy/test/performance-inefficient-algorithm.cpp
+++ b/tools/clang-tidy/test/performance-inefficient-algorithm.cpp
@@ -1,36 +1,30 @@
 namespace std {
-template <typename T>
-struct less {
+template <typename T> struct less {
   bool operator()(const T &lhs, const T &rhs) { return lhs < rhs; }
 };
 
-template <typename T>
-struct greater {
+template <typename T> struct greater {
   bool operator()(const T &lhs, const T &rhs) { return lhs > rhs; }
 };
 
 struct iterator_type {};
 
-template <typename K, typename Cmp = less<K>>
-struct set {
+template <typename K, typename Cmp = less<K>> struct set {
   typedef iterator_type iterator;
   iterator find(const K &k);
   unsigned count(const K &k);
 
   iterator begin();
   iterator end();
   iterator begin() const;
   iterator end() const;
 };
 
 template <typename FwIt, typename K>
-FwIt find(FwIt, FwIt end, const K &) {
-  return end;
+FwIt find(FwIt, FwIt end, const K &) { return end; }
 }
-}  // namespace std
 
-template <typename T>
-void f(const T &t) {
+template <typename T> void f(const T &t) {
   std::set<int> s;
   find(s.begin(), s.end(), 46);
 }
--- a/tools/clang-tidy/test/performance-inefficient-vector-operation.cpp
+++ b/tools/clang-tidy/test/performance-inefficient-vector-operation.cpp
@@ -1,9 +1,10 @@
 #include "structures.h"
 
-void foo() {
+void foo()
+{
   std::vector<int> v;
   int n = 100;
   for (int i = 0; i < n; ++i) {
     v.push_back(n);
   }
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/performance-move-const-arg.cpp
+++ b/tools/clang-tidy/test/performance-move-const-arg.cpp
@@ -3,17 +3,17 @@ template <typename _Tp>
 struct remove_reference {
   typedef _Tp type;
 };
 
 template <typename _Tp>
 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) {
   return static_cast<typename std::remove_reference<_Tp>::type &&>(__t);
 }
-}  // namespace std
+} // namespace std
 
 struct TriviallyCopyable {
   int i;
 };
 
 void f(TriviallyCopyable) {}
 
 void g() {
--- a/tools/clang-tidy/test/performance-move-constructor-init.cpp
+++ b/tools/clang-tidy/test/performance-move-constructor-init.cpp
@@ -1,11 +1,11 @@
 struct B {
   B() {}
-  B(const B &) {}
+  B(const B&) {}
   B(B &&) {}
 };
 
 struct D : B {
   D() : B() {}
   D(const D &RHS) : B(RHS) {}
   D(D &&RHS) : B(RHS) {}
 };
--- a/tools/clang-tidy/test/performance-type-promotion-in-math-fn.cpp
+++ b/tools/clang-tidy/test/performance-type-promotion-in-math-fn.cpp
@@ -1,6 +1,7 @@
 double acos(double);
 
-void check_all_fns() {
+void check_all_fns()
+{
   float a;
   acos(a);
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/performance-unnecessary-copy-initialization.cpp
+++ b/tools/clang-tidy/test/performance-unnecessary-copy-initialization.cpp
@@ -1,5 +1,7 @@
 #include "structures.h"
 
 extern const std::string& constReference();
 
-void foo() { const std::string UnnecessaryCopy = constReference(); }
\ No newline at end of file
+void foo() {
+  const std::string UnnecessaryCopy = constReference();
+}
\ No newline at end of file
--- a/tools/clang-tidy/test/performance-unnecessary-value-param.cpp
+++ b/tools/clang-tidy/test/performance-unnecessary-value-param.cpp
@@ -1,3 +1,4 @@
 #include "structures.h"
 
-void f(const std::string Value) {}
\ No newline at end of file
+void f(const std::string Value) {
+}
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-braces-around-statements.cpp
+++ b/tools/clang-tidy/test/readability-braces-around-statements.cpp
@@ -1,17 +1,14 @@
 
 void do_something(const char *) {}
 
-bool cond(const char *) { return false; }
+bool cond(const char *) {
+  return false;
+}
 
 void test() {
-  if (cond("if0") /*comment*/) do_something("same-line");
+if (cond("if0") /*comment*/) do_something("same-line");
 }
 
 void foo() {
-  if (1)
-    while (2)
-      if (3)
-        for (;;) do
-            ;
-          while (false) /**/; /**/
+if (1) while (2) if (3) for (;;) do ; while(false) /**/;/**/
 }
--- a/tools/clang-tidy/test/readability-container-size-empty.cpp
+++ b/tools/clang-tidy/test/readability-container-size-empty.cpp
@@ -1,6 +1,7 @@
 #include "structures.h"
 
 void foo() {
   std::string a;
-  if (a.size()) return;
+  if (a.size())
+    return;
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-else-after-return.cpp
+++ b/tools/clang-tidy/test/readability-else-after-return.cpp
@@ -1,8 +1,10 @@
-void f() {}
+void f() {
+
+}
 
 void foo() {
   if (true)
     return;
   else
     f();
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-implicit-bool-conversion.cpp
+++ b/tools/clang-tidy/test/readability-implicit-bool-conversion.cpp
@@ -38,24 +38,18 @@ void f() {
 
   InitializedWithInt i = b;
   (InitializedWithInt(b));
 
   bool x = b;
 
   int exp = (int)true;
 
-  if (x == b) {
-  }
-  if (x != b) {
-  }
+  if (x == b) {}
+  if (x != b) {}
 
-  if (b == exp) {
-  }
-  if (exp == b) {
-  }
+  if (b == exp) {}
+  if (exp == b) {}
 
   char* ptr;
-  // Shouldn't trigger a checker warning since we are using
-  // AllowPointerConditions
-  if (ptr) {
-  }
+  // Shouldn't trigger a checker warning since we are using AllowPointerConditions
+  if (ptr) {}
 }
--- a/tools/clang-tidy/test/readability-inconsistent-declaration-parameter-name.cpp
+++ b/tools/clang-tidy/test/readability-inconsistent-declaration-parameter-name.cpp
@@ -1,5 +1,6 @@
 struct S {
   void f(int x);
 };
 
-void S::f(int y) {}
\ No newline at end of file
+void S::f(int y) {
+}
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-misleading-indentation.cpp
+++ b/tools/clang-tidy/test/readability-misleading-indentation.cpp
@@ -1,9 +1,11 @@
-void f() {}
+void f()
+{
+}
 
 void foo() {
   if (1)
     if (0)
       f();
-    else
-      f();
+  else
+    f();
 }
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-redundant-smartptr-get.cpp
+++ b/tools/clang-tidy/test/readability-redundant-smartptr-get.cpp
@@ -4,13 +4,17 @@ namespace std {
 
 template <typename T>
 struct unique_ptr {
   T& operator*() const;
   T* operator->() const;
   T* get() const;
   explicit operator bool() const noexcept;
 };
-}  // namespace std
+}
+
+struct A {
+};
 
-struct A {};
+void foo() {
+  A& b2 = *std::unique_ptr<A>().get();
+}
 
-void foo() { A& b2 = *std::unique_ptr<A>().get(); }
--- a/tools/clang-tidy/test/readability-redundant-string-init.cpp
+++ b/tools/clang-tidy/test/readability-redundant-string-init.cpp
@@ -1,3 +1,5 @@
 #include "structures.h"
 
-int foo() { std::string a = ""; }
\ No newline at end of file
+int foo() {
+  std::string a = "";
+}
\ No newline at end of file
--- a/tools/clang-tidy/test/readability-static-accessed-through-instance.cpp
+++ b/tools/clang-tidy/test/readability-static-accessed-through-instance.cpp
@@ -1,9 +1,11 @@
 struct C {
   static int x;
 };
 
 int C::x = 0;
 
 // Expressions with side effects
 C &f(int, int, int, int);
-void g() { f(1, 2, 3, 4).x; }
+void g() {
+  f(1, 2, 3, 4).x;
+}
--- a/tools/clang-tidy/test/structures.h
+++ b/tools/clang-tidy/test/structures.h
@@ -1,90 +1,87 @@
-// Proxy file in order to define generic data types, to avoid binding with
-// system headers
+// Proxy file in order to define generic data types, to avoid binding with system headers
 
 typedef __SIZE_TYPE__ size_t;
 
 namespace std {
 
 typedef size_t size_t;
 
 template <class T>
 class vector {
  public:
-  typedef T *iterator;
-  typedef const T *const_iterator;
-  typedef T &reference;
-  typedef const T &const_reference;
+  typedef T* iterator;
+  typedef const T* const_iterator;
+  typedef T& reference;
+  typedef const T& const_reference;
   typedef size_t size_type;
 
   explicit vector();
   explicit vector(size_type n);
 
   void swap(vector &other);
-  void push_back(const T &val);
+  void push_back(const T& val);
 
-  template <class... Args>
-  void emplace_back(Args &&... args);
+  template <class... Args> void emplace_back(Args &&... args);
 
   void reserve(size_t n);
   void resize(size_t n);
 
   size_t size();
-  const_reference operator[](size_type) const;
-  reference operator[](size_type);
+  const_reference operator[] (size_type) const;
+  reference operator[] (size_type);
 
   const_iterator begin() const;
   const_iterator end() const;
 };
 
 template <typename T>
 class basic_string {
- public:
+public:
   typedef basic_string<T> _Type;
   basic_string() {}
   basic_string(const T *p);
   basic_string(const T *p, size_t count);
   basic_string(size_t count, char ch);
   ~basic_string() {}
   size_t size() const;
   bool empty() const;
-  size_t find(const char *s, size_t pos = 0) const;
+  size_t find (const char* s, size_t pos = 0) const;
   const T *c_str() const;
-  _Type &assign(const T *s);
+  _Type& assign(const T *s);
   basic_string<T> &operator=(T ch);
   basic_string<T> *operator+=(const basic_string<T> &) {}
-  friend basic_string<T> operator+(const basic_string<T> &,
-                                   const basic_string<T> &) {}
+  friend basic_string<T> operator+(const basic_string<T> &, const basic_string<T> &) {}
 };
 typedef basic_string<char> string;
 typedef basic_string<wchar_t> wstring;
 
 string to_string(int value);
 
 template <typename T>
 struct default_delete {};
 
 template <typename T, typename D = default_delete<T>>
 class unique_ptr {
  public:
   unique_ptr();
   ~unique_ptr();
-  explicit unique_ptr(T *);
+  explicit unique_ptr(T*);
   template <typename U, typename E>
-  unique_ptr(unique_ptr<U, E> &&);
-  T *release();
+  unique_ptr(unique_ptr<U, E>&&);
+  T* release();
 };
 
 template <class Fp, class... Arguments>
 class bind_rt {};
 
 template <class Fp, class... Arguments>
 bind_rt<Fp, Arguments...> bind(Fp &&, Arguments &&...);
-}  // namespace std
+}
 
 typedef unsigned int uid_t;
 typedef unsigned int pid_t;
 
 int bcmp(void *, void *, size_t);
 void bcopy(void *, void *, size_t);
 void bzero(void *, size_t);
 
@@ -93,18 +90,19 @@ int setuid(uid_t uid);
 
 int mkstemp(char *tmpl);
 char *mktemp(char *tmpl);
 
 pid_t vfork(void);
 
 int abort() { return 0; }
 
-#define assert(x) \
-  if (!(x)) (void)abort()
+#define assert(x)                                                              \
+  if (!(x))                                                                    \
+  (void)abort()
 
 size_t strlen(const char *s);
 char *strncat(char *s1, const char *s2, size_t);
 
 void free(void *ptr);
 void *malloc(size_t size);
 
 void *memset(void *b, int c, size_t len);