Remove NOLINTs from compiler-rt

llvm-svn: 371687
GitOrigin-RevId: c0fa632236308100e1031fc86edfde13ddc4bcef
diff --git a/lib/sanitizer_common/sanitizer_allocator_checks.h b/lib/sanitizer_common/sanitizer_allocator_checks.h
index f436ce9..fc426f0 100644
--- a/lib/sanitizer_common/sanitizer_allocator_checks.h
+++ b/lib/sanitizer_common/sanitizer_allocator_checks.h
@@ -54,7 +54,7 @@
 // and a multiple of sizeof(void *).
 INLINE bool CheckPosixMemalignAlignment(uptr alignment) {
   return alignment != 0 && IsPowerOfTwo(alignment) &&
-         (alignment % sizeof(void *)) == 0; // NOLINT
+         (alignment % sizeof(void *)) == 0;
 }
 
 // Returns true if calloc(size, n) call overflows on size*n calculation.
diff --git a/lib/sanitizer_common/sanitizer_allocator_report.cpp b/lib/sanitizer_common/sanitizer_allocator_report.cpp
index dbcf2b7..d74e080 100644
--- a/lib/sanitizer_common/sanitizer_allocator_report.cpp
+++ b/lib/sanitizer_common/sanitizer_allocator_report.cpp
@@ -106,10 +106,11 @@
   {
     ScopedAllocatorErrorReport report("invalid-posix-memalign-alignment",
                                       stack);
-    Report("ERROR: %s: invalid alignment requested in "
-           "posix_memalign: %zd, alignment must be a power of two and a "
-           "multiple of sizeof(void*) == %zd\n", SanitizerToolName, alignment,
-           sizeof(void*));  // NOLINT
+    Report(
+        "ERROR: %s: invalid alignment requested in "
+        "posix_memalign: %zd, alignment must be a power of two and a "
+        "multiple of sizeof(void*) == %zd\n",
+        SanitizerToolName, alignment, sizeof(void *));
   }
   Die();
 }
diff --git a/lib/sanitizer_common/sanitizer_asm.h b/lib/sanitizer_common/sanitizer_asm.h
index 184d118..803af32 100644
--- a/lib/sanitizer_common/sanitizer_asm.h
+++ b/lib/sanitizer_common/sanitizer_asm.h
@@ -60,7 +60,9 @@
 
 #if defined(__ELF__) && (defined(__GNU__) || defined(__FreeBSD__) || \
                          defined(__Fuchsia__) || defined(__linux__))
-#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits // NOLINT
+// clang-format off
+#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits  // NOLINT
+// clang-format on
 #else
 #define NO_EXEC_STACK_DIRECTIVE
 #endif
diff --git a/lib/sanitizer_common/sanitizer_atomic_msvc.h b/lib/sanitizer_common/sanitizer_atomic_msvc.h
index a249657..6a7c546 100644
--- a/lib/sanitizer_common/sanitizer_atomic_msvc.h
+++ b/lib/sanitizer_common/sanitizer_atomic_msvc.h
@@ -20,44 +20,35 @@
 #pragma intrinsic(_mm_mfence)
 extern "C" void _mm_pause();
 #pragma intrinsic(_mm_pause)
-extern "C" char _InterlockedExchange8(   // NOLINT
-    char volatile *Addend, char Value);  // NOLINT
+extern "C" char _InterlockedExchange8(char volatile *Addend, char Value);
 #pragma intrinsic(_InterlockedExchange8)
-extern "C" short _InterlockedExchange16(   // NOLINT
-    short volatile *Addend, short Value);  // NOLINT
+extern "C" short _InterlockedExchange16(short volatile *Addend, short Value);
 #pragma intrinsic(_InterlockedExchange16)
-extern "C" long _InterlockedExchange(    // NOLINT
-    long volatile *Addend, long Value);  // NOLINT
+extern "C" long _InterlockedExchange(long volatile *Addend, long Value);
 #pragma intrinsic(_InterlockedExchange)
-extern "C" long _InterlockedExchangeAdd(  // NOLINT
-    long volatile * Addend, long Value);  // NOLINT
+extern "C" long _InterlockedExchangeAdd(long volatile *Addend, long Value);
 #pragma intrinsic(_InterlockedExchangeAdd)
-extern "C" char _InterlockedCompareExchange8(  // NOLINT
-    char volatile *Destination,                // NOLINT
-    char Exchange, char Comparand);            // NOLINT
+extern "C" char _InterlockedCompareExchange8(char volatile *Destination,
+                                             char Exchange, char Comparand);
 #pragma intrinsic(_InterlockedCompareExchange8)
-extern "C" short _InterlockedCompareExchange16(  // NOLINT
-    short volatile *Destination,                 // NOLINT
-    short Exchange, short Comparand);            // NOLINT
+extern "C" short _InterlockedCompareExchange16(short volatile *Destination,
+                                               short Exchange, short Comparand);
 #pragma intrinsic(_InterlockedCompareExchange16)
-extern "C"
-long long _InterlockedCompareExchange64(  // NOLINT
-    long long volatile *Destination,              // NOLINT
-    long long Exchange, long long Comparand);     // NOLINT
+extern "C" long long _InterlockedCompareExchange64(
+    long long volatile *Destination, long long Exchange, long long Comparand);
 #pragma intrinsic(_InterlockedCompareExchange64)
 extern "C" void *_InterlockedCompareExchangePointer(
     void *volatile *Destination,
     void *Exchange, void *Comparand);
 #pragma intrinsic(_InterlockedCompareExchangePointer)
-extern "C"
-long __cdecl _InterlockedCompareExchange(  // NOLINT
-    long volatile *Destination,            // NOLINT
-    long Exchange, long Comparand);        // NOLINT
+extern "C" long __cdecl _InterlockedCompareExchange(long volatile *Destination,
+                                                    long Exchange,
+                                                    long Comparand);
 #pragma intrinsic(_InterlockedCompareExchange)
 
 #ifdef _WIN64
-extern "C" long long _InterlockedExchangeAdd64(     // NOLINT
-    long long volatile * Addend, long long Value);  // NOLINT
+extern "C" long long _InterlockedExchangeAdd64(long long volatile *Addend,
+                                               long long Value);
 #pragma intrinsic(_InterlockedExchangeAdd64)
 #endif
 
@@ -115,8 +106,8 @@
     u32 v, memory_order mo) {
   (void)mo;
   DCHECK(!((uptr)a % sizeof(*a)));
-  return (u32)_InterlockedExchangeAdd(
-      (volatile long*)&a->val_dont_use, (long)v);  // NOLINT
+  return (u32)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+                                      (long)v);
 }
 
 INLINE uptr atomic_fetch_add(volatile atomic_uintptr_t *a,
@@ -124,11 +115,11 @@
   (void)mo;
   DCHECK(!((uptr)a % sizeof(*a)));
 #ifdef _WIN64
-  return (uptr)_InterlockedExchangeAdd64(
-      (volatile long long*)&a->val_dont_use, (long long)v);  // NOLINT
+  return (uptr)_InterlockedExchangeAdd64((volatile long long *)&a->val_dont_use,
+                                         (long long)v);
 #else
-  return (uptr)_InterlockedExchangeAdd(
-      (volatile long*)&a->val_dont_use, (long)v);  // NOLINT
+  return (uptr)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+                                       (long)v);
 #endif
 }
 
@@ -136,8 +127,8 @@
     u32 v, memory_order mo) {
   (void)mo;
   DCHECK(!((uptr)a % sizeof(*a)));
-  return (u32)_InterlockedExchangeAdd(
-      (volatile long*)&a->val_dont_use, -(long)v);  // NOLINT
+  return (u32)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+                                      -(long)v);
 }
 
 INLINE uptr atomic_fetch_sub(volatile atomic_uintptr_t *a,
@@ -145,11 +136,11 @@
   (void)mo;
   DCHECK(!((uptr)a % sizeof(*a)));
 #ifdef _WIN64
-  return (uptr)_InterlockedExchangeAdd64(
-      (volatile long long*)&a->val_dont_use, -(long long)v);  // NOLINT
+  return (uptr)_InterlockedExchangeAdd64((volatile long long *)&a->val_dont_use,
+                                         -(long long)v);
 #else
-  return (uptr)_InterlockedExchangeAdd(
-      (volatile long*)&a->val_dont_use, -(long)v);  // NOLINT
+  return (uptr)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+                                       -(long)v);
 #endif
 }
 
diff --git a/lib/sanitizer_common/sanitizer_common.cpp b/lib/sanitizer_common/sanitizer_common.cpp
index 451c9e5..f5f9f49 100644
--- a/lib/sanitizer_common/sanitizer_common.cpp
+++ b/lib/sanitizer_common/sanitizer_common.cpp
@@ -323,7 +323,7 @@
 
 } // namespace __sanitizer
 
-using namespace __sanitizer;  // NOLINT
+using namespace __sanitizer;
 
 extern "C" {
 SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_report_error_summary,
diff --git a/lib/sanitizer_common/sanitizer_common.h b/lib/sanitizer_common/sanitizer_common.h
index b5dc6e1..ad056df 100644
--- a/lib/sanitizer_common/sanitizer_common.h
+++ b/lib/sanitizer_common/sanitizer_common.h
@@ -339,18 +339,18 @@
 // Math
 #if SANITIZER_WINDOWS && !defined(__clang__) && !defined(__GNUC__)
 extern "C" {
-unsigned char _BitScanForward(unsigned long *index, unsigned long mask);  // NOLINT
-unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);  // NOLINT
+unsigned char _BitScanForward(unsigned long *index, unsigned long mask);
+unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
 #if defined(_WIN64)
-unsigned char _BitScanForward64(unsigned long *index, unsigned __int64 mask);  // NOLINT
-unsigned char _BitScanReverse64(unsigned long *index, unsigned __int64 mask);  // NOLINT
+unsigned char _BitScanForward64(unsigned long *index, unsigned __int64 mask);
+unsigned char _BitScanReverse64(unsigned long *index, unsigned __int64 mask);
 #endif
 }
 #endif
 
 INLINE uptr MostSignificantSetBitIndex(uptr x) {
   CHECK_NE(x, 0U);
-  unsigned long up;  // NOLINT
+  unsigned long up;
 #if !SANITIZER_WINDOWS || defined(__clang__) || defined(__GNUC__)
 # ifdef _WIN64
   up = SANITIZER_WORDSIZE - 1 - __builtin_clzll(x);
@@ -367,7 +367,7 @@
 
 INLINE uptr LeastSignificantSetBitIndex(uptr x) {
   CHECK_NE(x, 0U);
-  unsigned long up;  // NOLINT
+  unsigned long up;
 #if !SANITIZER_WINDOWS || defined(__clang__) || defined(__GNUC__)
 # ifdef _WIN64
   up = __builtin_ctzll(x);
diff --git a/lib/sanitizer_common/sanitizer_common_interceptors.inc b/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 9975f53..fe992bf 100644
--- a/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1267,9 +1267,8 @@
 #endif
 
 #if SANITIZER_INTERCEPT_PRCTL
-INTERCEPTOR(int, prctl, int option, unsigned long arg2,
-            unsigned long arg3,                        // NOLINT
-            unsigned long arg4, unsigned long arg5) {  // NOLINT
+INTERCEPTOR(int, prctl, int option, unsigned long arg2, unsigned long arg3,
+            unsigned long arg4, unsigned long arg5) {
   void *ctx;
   COMMON_INTERCEPTOR_ENTER(ctx, prctl, option, arg2, arg3, arg4, arg5);
   static const int PR_SET_NAME = 15;
@@ -1701,13 +1700,13 @@
 FORMAT_INTERCEPTOR_IMPL(__fprintf_chk, vfprintf, stream, format)
 #endif
 
-INTERCEPTOR(int, sprintf, char *str, const char *format, ...) // NOLINT
-FORMAT_INTERCEPTOR_IMPL(sprintf, vsprintf, str, format) // NOLINT
+INTERCEPTOR(int, sprintf, char *str, const char *format, ...)
+FORMAT_INTERCEPTOR_IMPL(sprintf, vsprintf, str, format)
 
 #if SANITIZER_INTERCEPT___PRINTF_CHK
 INTERCEPTOR(int, __sprintf_chk, char *str, int flag, SIZE_T size_to,
-            const char *format, ...) // NOLINT
-FORMAT_INTERCEPTOR_IMPL(__sprintf_chk, vsprintf, str, format) // NOLINT
+            const char *format, ...)
+FORMAT_INTERCEPTOR_IMPL(__sprintf_chk, vsprintf, str, format)
 #endif
 
 INTERCEPTOR(int, snprintf, char *str, SIZE_T size, const char *format, ...)
@@ -1715,8 +1714,8 @@
 
 #if SANITIZER_INTERCEPT___PRINTF_CHK
 INTERCEPTOR(int, __snprintf_chk, char *str, SIZE_T size, int flag,
-            SIZE_T size_to, const char *format, ...) // NOLINT
-FORMAT_INTERCEPTOR_IMPL(__snprintf_chk, vsnprintf, str, size, format) // NOLINT
+            SIZE_T size_to, const char *format, ...)
+FORMAT_INTERCEPTOR_IMPL(__snprintf_chk, vsnprintf, str, size, format)
 #endif
 
 INTERCEPTOR(int, asprintf, char **strp, const char *format, ...)
@@ -6716,7 +6715,7 @@
   COMMON_INTERCEPTOR_READ_RANGE(ctx, dst, (dst_size + 1) * sizeof(wchar_t));
   COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dst + dst_size,
                                  (src_size + 1) * sizeof(wchar_t));
-  return REAL(wcscat)(dst, src);  // NOLINT
+  return REAL(wcscat)(dst, src);
 }
 
 INTERCEPTOR(wchar_t *, wcsncat, wchar_t *dst, const wchar_t *src, SIZE_T n) {
@@ -6729,7 +6728,7 @@
   COMMON_INTERCEPTOR_READ_RANGE(ctx, dst, (dst_size + 1) * sizeof(wchar_t));
   COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dst + dst_size,
                                  (src_size + 1) * sizeof(wchar_t));
-  return REAL(wcsncat)(dst, src, n);  // NOLINT
+  return REAL(wcsncat)(dst, src, n);
 }
 #define INIT_WCSCAT                  \
   COMMON_INTERCEPT_FUNCTION(wcscat); \
@@ -9568,8 +9567,7 @@
 static void InitializeCommonInterceptors() {
 #if SI_POSIX
   static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
-  interceptor_metadata_map =
-      new ((void *)&metadata_mem) MetadataHashMap();  // NOLINT
+  interceptor_metadata_map = new ((void *)&metadata_mem) MetadataHashMap();
 #endif
 
   INIT_MMAP;
diff --git a/lib/sanitizer_common/sanitizer_coverage_fuchsia.cpp b/lib/sanitizer_common/sanitizer_coverage_fuchsia.cpp
index 5451d1e..f18cee6 100644
--- a/lib/sanitizer_common/sanitizer_coverage_fuchsia.cpp
+++ b/lib/sanitizer_common/sanitizer_coverage_fuchsia.cpp
@@ -36,7 +36,7 @@
 #include <zircon/sanitizer.h>
 #include <zircon/syscalls.h>
 
-using namespace __sanitizer;  // NOLINT
+using namespace __sanitizer;
 
 namespace __sancov {
 namespace {
@@ -198,8 +198,8 @@
 }  // namespace __sanitizer
 
 extern "C" {
-SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage(  // NOLINT
-    const uptr *pcs, uptr len) {
+SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage(const uptr *pcs,
+                                                             uptr len) {
   UNIMPLEMENTED();
 }
 
diff --git a/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp b/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
index ad137f9..6a75792 100644
--- a/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
+++ b/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
@@ -166,8 +166,8 @@
 } // namespace __sanitizer
 
 extern "C" {
-SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage(  // NOLINT
-    const uptr* pcs, uptr len) {
+SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage(const uptr* pcs,
+                                                             uptr len) {
   return __sancov::SanitizerDumpCoverage(pcs, len);
 }
 
diff --git a/lib/sanitizer_common/sanitizer_coverage_win_sections.cpp b/lib/sanitizer_common/sanitizer_coverage_win_sections.cpp
index 40184bb..e7d6563 100644
--- a/lib/sanitizer_common/sanitizer_coverage_win_sections.cpp
+++ b/lib/sanitizer_common/sanitizer_coverage_win_sections.cpp
@@ -31,7 +31,7 @@
 // Use uint64_t so the linker won't need to add any padding if it tries to word
 // align the start of the 8-bit counters array. The array will always start 8
 // bytes after __start_sancov_cntrs.
-#pragma section(".SCOV$CA", read, write)  // NOLINT
+#pragma section(".SCOV$CA", read, write)
 __declspec(allocate(".SCOV$CA")) uint64_t __start___sancov_cntrs = 0;
 
 // Even though we said not to align __stop__sancov_cntrs (using the "align"
@@ -41,13 +41,13 @@
 // padding would be added to align .SCOVP$Z, However, if .SCOV$CZ section is 1
 // byte, the linker won't try to align it on an 8-byte boundary, so use a
 // uint8_t for __stop_sancov_cntrs.
-#pragma section(".SCOV$CZ", read, write)  // NOLINT
+#pragma section(".SCOV$CZ", read, write)
 __declspec(allocate(".SCOV$CZ")) __declspec(align(1)) uint8_t
     __stop___sancov_cntrs = 0;
 
-#pragma section(".SCOV$GA", read, write)  // NOLINT
+#pragma section(".SCOV$GA", read, write)
 __declspec(allocate(".SCOV$GA")) uint64_t __start___sancov_guards = 0;
-#pragma section(".SCOV$GZ", read, write)  // NOLINT
+#pragma section(".SCOV$GZ", read, write)
 __declspec(allocate(".SCOV$GZ")) __declspec(align(1)) uint8_t
     __stop___sancov_guards = 0;
 
@@ -56,9 +56,9 @@
 // constant it should be merged with the .rdata section.
 #pragma comment(linker, "/MERGE:.SCOV=.data")
 
-#pragma section(".SCOVP$A", read)  // NOLINT
+#pragma section(".SCOVP$A", read)
 __declspec(allocate(".SCOVP$A")) uint64_t __start___sancov_pcs = 0;
-#pragma section(".SCOVP$Z", read)  // NOLINT
+#pragma section(".SCOVP$Z", read)
 __declspec(allocate(".SCOVP$Z")) __declspec(align(1)) uint8_t
     __stop___sancov_pcs = 0;
 
diff --git a/lib/sanitizer_common/sanitizer_file.cpp b/lib/sanitizer_common/sanitizer_file.cpp
index c8c0b33..79930d7 100644
--- a/lib/sanitizer_common/sanitizer_file.cpp
+++ b/lib/sanitizer_common/sanitizer_file.cpp
@@ -199,7 +199,7 @@
 
 } // namespace __sanitizer
 
-using namespace __sanitizer;  // NOLINT
+using namespace __sanitizer;
 
 extern "C" {
 void __sanitizer_set_report_path(const char *path) {
diff --git a/lib/sanitizer_common/sanitizer_flag_parser.h b/lib/sanitizer_common/sanitizer_flag_parser.h
index 8e12700..b68e29c 100644
--- a/lib/sanitizer_common/sanitizer_flag_parser.h
+++ b/lib/sanitizer_common/sanitizer_flag_parser.h
@@ -144,7 +144,7 @@
 template <typename T>
 static void RegisterFlag(FlagParser *parser, const char *name, const char *desc,
                          T *var) {
-  FlagHandler<T> *fh = new (FlagParser::Alloc) FlagHandler<T>(var);  // NOLINT
+  FlagHandler<T> *fh = new (FlagParser::Alloc) FlagHandler<T>(var);
   parser->RegisterHandler(name, fh, desc);
 }
 
diff --git a/lib/sanitizer_common/sanitizer_flags.cpp b/lib/sanitizer_common/sanitizer_flags.cpp
index acc7ed3..66a0a55 100644
--- a/lib/sanitizer_common/sanitizer_flags.cpp
+++ b/lib/sanitizer_common/sanitizer_flags.cpp
@@ -92,11 +92,11 @@
 };
 
 void RegisterIncludeFlags(FlagParser *parser, CommonFlags *cf) {
-  FlagHandlerInclude *fh_include = new (FlagParser::Alloc) // NOLINT
+  FlagHandlerInclude *fh_include = new (FlagParser::Alloc)
       FlagHandlerInclude(parser, /*ignore_missing*/ false);
   parser->RegisterHandler("include", fh_include,
                           "read more options from the given file");
-  FlagHandlerInclude *fh_include_if_exists = new (FlagParser::Alloc) // NOLINT
+  FlagHandlerInclude *fh_include_if_exists = new (FlagParser::Alloc)
       FlagHandlerInclude(parser, /*ignore_missing*/ true);
   parser->RegisterHandler(
       "include_if_exists", fh_include_if_exists,
diff --git a/lib/sanitizer_common/sanitizer_fuchsia.cpp b/lib/sanitizer_common/sanitizer_fuchsia.cpp
index 3dc6863..6e2c613 100644
--- a/lib/sanitizer_common/sanitizer_fuchsia.cpp
+++ b/lib/sanitizer_common/sanitizer_fuchsia.cpp
@@ -502,7 +502,7 @@
 
 }  // namespace __sanitizer
 
-using namespace __sanitizer;  // NOLINT
+using namespace __sanitizer;
 
 extern "C" {
 void __sanitizer_startup_hook(int argc, char **argv, char **envp,
diff --git a/lib/sanitizer_common/sanitizer_getauxval.h b/lib/sanitizer_common/sanitizer_getauxval.h
index cbd1af1..f1ca0be 100644
--- a/lib/sanitizer_common/sanitizer_getauxval.h
+++ b/lib/sanitizer_common/sanitizer_getauxval.h
@@ -38,8 +38,7 @@
 // The weak getauxval definition allows to check for the function at runtime.
 // This is useful for Android, when compiled at a lower API level yet running
 // on a more recent platform that offers the function.
-extern "C" SANITIZER_WEAK_ATTRIBUTE
-unsigned long getauxval(unsigned long type);  // NOLINT
+extern "C" SANITIZER_WEAK_ATTRIBUTE unsigned long getauxval(unsigned long type);
 # endif
 
 #endif // SANITIZER_LINUX || SANITIZER_FUCHSIA
diff --git a/lib/sanitizer_common/sanitizer_internal_defs.h b/lib/sanitizer_common/sanitizer_internal_defs.h
index e0c6506..0022630 100644
--- a/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -133,27 +133,27 @@
 
 #if defined(_WIN64)
 // 64-bit Windows uses LLP64 data model.
-typedef unsigned long long uptr;  // NOLINT
-typedef signed   long long sptr;  // NOLINT
+typedef unsigned long long uptr;
+typedef signed long long sptr;
 #else
-typedef unsigned long uptr;  // NOLINT
-typedef signed   long sptr;  // NOLINT
+typedef unsigned long uptr;
+typedef signed long sptr;
 #endif  // defined(_WIN64)
 #if defined(__x86_64__)
 // Since x32 uses ILP32 data model in 64-bit hardware mode, we must use
 // 64-bit pointer to unwind stack frame.
-typedef unsigned long long uhwptr;  // NOLINT
+typedef unsigned long long uhwptr;
 #else
-typedef uptr uhwptr;   // NOLINT
+typedef uptr uhwptr;
 #endif
 typedef unsigned char u8;
-typedef unsigned short u16;  // NOLINT
+typedef unsigned short u16;
 typedef unsigned int u32;
-typedef unsigned long long u64;  // NOLINT
-typedef signed   char s8;
-typedef signed   short s16;  // NOLINT
-typedef signed   int s32;
-typedef signed   long long s64;  // NOLINT
+typedef unsigned long long u64;
+typedef signed char s8;
+typedef signed short s16;
+typedef signed int s32;
+typedef signed long long s64;
 #if SANITIZER_WINDOWS
 // On Windows, files are HANDLE, which is a synonim of void*.
 // Use void* to avoid including <windows.h> everywhere.
@@ -264,7 +264,7 @@
 
 #if SANITIZER_WINDOWS
 }  // namespace __sanitizer
-typedef unsigned long DWORD;  // NOLINT
+typedef unsigned long DWORD;
 namespace __sanitizer {
 typedef DWORD thread_return_t;
 # define THREAD_CALLING_CONV __stdcall
@@ -419,18 +419,41 @@
 
 }  // namespace __sanitizer
 
-namespace __asan  { using namespace __sanitizer; }  // NOLINT
-namespace __dsan  { using namespace __sanitizer; }  // NOLINT
-namespace __dfsan { using namespace __sanitizer; }  // NOLINT
-namespace __lsan  { using namespace __sanitizer; }  // NOLINT
-namespace __msan  { using namespace __sanitizer; }  // NOLINT
-namespace __hwasan  { using namespace __sanitizer; }  // NOLINT
-namespace __tsan  { using namespace __sanitizer; }  // NOLINT
-namespace __scudo { using namespace __sanitizer; }  // NOLINT
-namespace __ubsan { using namespace __sanitizer; }  // NOLINT
-namespace __xray  { using namespace __sanitizer; }  // NOLINT
-namespace __interception  { using namespace __sanitizer; }  // NOLINT
-namespace __hwasan  { using namespace __sanitizer; }  // NOLINT
-
+namespace __asan {
+using namespace __sanitizer;
+}
+namespace __dsan {
+using namespace __sanitizer;
+}
+namespace __dfsan {
+using namespace __sanitizer;
+}
+namespace __lsan {
+using namespace __sanitizer;
+}
+namespace __msan {
+using namespace __sanitizer;
+}
+namespace __hwasan {
+using namespace __sanitizer;
+}
+namespace __tsan {
+using namespace __sanitizer;
+}
+namespace __scudo {
+using namespace __sanitizer;
+}
+namespace __ubsan {
+using namespace __sanitizer;
+}
+namespace __xray {
+using namespace __sanitizer;
+}
+namespace __interception {
+using namespace __sanitizer;
+}
+namespace __hwasan {
+using namespace __sanitizer;
+}
 
 #endif  // SANITIZER_DEFS_H
diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 97afb5e..cf079c4 100644
--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -331,10 +331,9 @@
 #define SANITIZER_INTERCEPT_ETHER_HOST \
   (SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID)
 #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
-#define SANITIZER_INTERCEPT_SHMCTL          \
-  (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
-  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
-    SANITIZER_WORDSIZE == 64))  // NOLINT
+#define SANITIZER_INTERCEPT_SHMCTL                                       \
+  (((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && SANITIZER_WORDSIZE == 64) || \
+   SI_NETBSD || SI_OPENBSD || SI_SOLARIS)  // NOLINT
 #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
 #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETINHERITSCHED \
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h b/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
index 6b09cdc..71cf5b9 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
@@ -268,9 +268,8 @@
 
 // This thing depends on the platform. We are only interested in the upper
 // limit. Verified with a compiler assert in .cpp.
-const int pthread_attr_t_max_sz = 128;
 union __sanitizer_pthread_attr_t {
-  char size[pthread_attr_t_max_sz];  // NOLINT
+  char size[128];
   void *align;
 };
 
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index 1a4353c..b53ca11 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -546,9 +546,8 @@
 
 // This thing depends on the platform. We are only interested in the upper
 // limit. Verified with a compiler assert in .cpp.
-const int pthread_attr_t_max_sz = 128;
 union __sanitizer_pthread_attr_t {
-  char size[pthread_attr_t_max_sz];  // NOLINT
+  char size[128];
   void *align;
 };
 
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_solaris.h b/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
index 0182018..77ae6e6 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
@@ -237,9 +237,8 @@
 
 // This thing depends on the platform. We are only interested in the upper
 // limit. Verified with a compiler assert in .cpp.
-const int pthread_attr_t_max_sz = 128;
 union __sanitizer_pthread_attr_t {
-  char size[pthread_attr_t_max_sz]; // NOLINT
+  char size[128];
   void *align;
 };
 
diff --git a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
index 2c08274..4ef305c 100644
--- a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
+++ b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
@@ -150,8 +150,9 @@
 }
 
 SANITIZER_INTERFACE_ATTRIBUTE
-int __sanitizer_get_module_and_offset_for_pc( // NOLINT
-    uptr pc, char *module_name, uptr module_name_len, uptr *pc_offset) {
+int __sanitizer_get_module_and_offset_for_pc(uptr pc, char *module_name,
+                                             uptr module_name_len,
+                                             uptr *pc_offset) {
   return __sanitizer::GetModuleAndOffsetForPc(pc, module_name, module_name_len,
                                               pc_offset);
 }
diff --git a/lib/sanitizer_common/sanitizer_termination.cpp b/lib/sanitizer_common/sanitizer_termination.cpp
index e588c93..84be6fc 100644
--- a/lib/sanitizer_common/sanitizer_termination.cpp
+++ b/lib/sanitizer_common/sanitizer_termination.cpp
@@ -84,7 +84,7 @@
 
 } // namespace __sanitizer
 
-using namespace __sanitizer;  // NOLINT
+using namespace __sanitizer;
 
 extern "C" {
 SANITIZER_INTERFACE_ATTRIBUTE
diff --git a/lib/sanitizer_common/sanitizer_win.cpp b/lib/sanitizer_common/sanitizer_win.cpp
index 9f72ec1..ce2a431 100644
--- a/lib/sanitizer_common/sanitizer_win.cpp
+++ b/lib/sanitizer_common/sanitizer_win.cpp
@@ -676,7 +676,7 @@
   return ret;
 }
 
-#pragma section(".CRT$XID", long, read)  // NOLINT
+#pragma section(".CRT$XID", long, read)
 __declspec(allocate(".CRT$XID")) int (*__run_atexit)() = RunAtexit;
 #endif
 
diff --git a/lib/sanitizer_common/sanitizer_win_dll_thunk.cpp b/lib/sanitizer_common/sanitizer_win_dll_thunk.cpp
index aa0eb4d..1562c16 100644
--- a/lib/sanitizer_common/sanitizer_win_dll_thunk.cpp
+++ b/lib/sanitizer_common/sanitizer_win_dll_thunk.cpp
@@ -54,8 +54,8 @@
 #define INTERFACE_WEAK_FUNCTION(Name) INTERCEPT_SANITIZER_WEAK_FUNCTION(Name)
 #include "sanitizer_common_interface.inc"
 
-#pragma section(".DLLTH$A", read)  // NOLINT
-#pragma section(".DLLTH$Z", read)  // NOLINT
+#pragma section(".DLLTH$A", read)
+#pragma section(".DLLTH$Z", read)
 
 typedef void (*DllThunkCB)();
 extern "C" {
@@ -85,7 +85,7 @@
 
 // We want to call dll_thunk_init before C/C++ initializers / constructors are
 // executed, otherwise functions like memset might be invoked.
-#pragma section(".CRT$XIB", long, read)  // NOLINT
+#pragma section(".CRT$XIB", long, read)
 __declspec(allocate(".CRT$XIB")) int (*__dll_thunk_preinit)() =
     __dll_thunk_init;
 
@@ -94,7 +94,7 @@
   if (reason == /*DLL_PROCESS_ATTACH=*/1) __dll_thunk_init();
 }
 
-#pragma section(".CRT$XLAB", long, read)  // NOLINT
+#pragma section(".CRT$XLAB", long, read)
 __declspec(allocate(".CRT$XLAB")) void (WINAPI *__dll_thunk_tls_init)(void *,
     unsigned long, void *) = dll_thunk_thread_init;
 
diff --git a/lib/sanitizer_common/sanitizer_win_weak_interception.cpp b/lib/sanitizer_common/sanitizer_win_weak_interception.cpp
index a6f34c2..a6081a8 100644
--- a/lib/sanitizer_common/sanitizer_win_weak_interception.cpp
+++ b/lib/sanitizer_common/sanitizer_win_weak_interception.cpp
@@ -53,8 +53,8 @@
 #define INTERFACE_WEAK_FUNCTION(Name) INTERCEPT_SANITIZER_WEAK_FUNCTION(Name)
 #include "sanitizer_common_interface.inc"
 
-#pragma section(".WEAK$A", read)  // NOLINT
-#pragma section(".WEAK$Z", read)  // NOLINT
+#pragma section(".WEAK$A", read)
+#pragma section(".WEAK$Z", read)
 
 typedef void (*InterceptCB)();
 extern "C" {
@@ -77,7 +77,7 @@
   return 0;
 }
 
-#pragma section(".CRT$XIB", long, read)  // NOLINT
+#pragma section(".CRT$XIB", long, read)
 __declspec(allocate(".CRT$XIB")) int (*__weak_intercept_preinit)() =
     weak_intercept_init;
 
@@ -86,7 +86,7 @@
   if (reason == /*DLL_PROCESS_ATTACH=*/1) weak_intercept_init();
 }
 
-#pragma section(".CRT$XLAB", long, read)  // NOLINT
+#pragma section(".CRT$XLAB", long, read)
 __declspec(allocate(".CRT$XLAB")) void(WINAPI *__weak_intercept_tls_init)(
     void *, unsigned long, void *) = weak_intercept_thread_init;
 
diff --git a/lib/sanitizer_common/scripts/check_lint.sh b/lib/sanitizer_common/scripts/check_lint.sh
index fb7eeec..fc5bfca 100755
--- a/lib/sanitizer_common/scripts/check_lint.sh
+++ b/lib/sanitizer_common/scripts/check_lint.sh
@@ -17,16 +17,16 @@
 # Filters
 # TODO: remove some of these filters
 COMMON_LINT_FILTER=-build/include,-build/header_guard,-legal/copyright,-whitespace/comments,-readability/casting,\
--build/namespaces,-readability/braces,-build/c++11
+-build/namespaces,-readability/braces,-build/c++11,-runtime/int
 
-COMMON_LIT_TEST_LINT_FILTER=-whitespace/indent,-whitespace/line_length
+COMMON_LIT_TEST_LINT_FILTER=-whitespace/indent,-whitespace/line_length,-runtime/arrays
 
-ASAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int
-ASAN_TEST_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/sizeof,-runtime/int,-runtime/printf,-runtime/threadsafe_fn
+ASAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER}
+ASAN_TEST_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/sizeof,-runtime/printf,-runtime/threadsafe_fn
 ASAN_LIT_TEST_LINT_FILTER=${ASAN_TEST_LINT_FILTER},${COMMON_LIT_TEST_LINT_FILTER}
 
 TSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER}
-TSAN_TEST_LINT_FILTER=${TSAN_RTL_LINT_FILTER},-runtime/threadsafe_fn,-runtime/int
+TSAN_TEST_LINT_FILTER=${TSAN_RTL_LINT_FILTER},-runtime/threadsafe_fn
 TSAN_LIT_TEST_LINT_FILTER=${TSAN_TEST_LINT_FILTER},${COMMON_LIT_TEST_LINT_FILTER}
 
 MSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER}
@@ -34,12 +34,12 @@
 LSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER}
 LSAN_LIT_TEST_LINT_FILTER=${LSAN_RTL_LINT_FILTER},${COMMON_LIT_TEST_LINT_FILTER}
 
-DFSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int,-runtime/printf,-runtime/references,-readability/function
+DFSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/printf,-runtime/references,-readability/function
 SCUDO_RTL_LINT_FILTER=${COMMON_LINT_FILTER}
 
-COMMON_RTL_INC_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int,-runtime/sizeof,-runtime/printf,-readability/fn_size
+COMMON_RTL_INC_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/sizeof,-runtime/printf,-readability/fn_size
 
-SANITIZER_INCLUDES_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int
+SANITIZER_INCLUDES_LINT_FILTER=${COMMON_LINT_FILTER}
 
 MKTEMP_DIR=$(mktemp -qd /tmp/check_lint.XXXXXXXXXX)
 MKTEMP="mktemp -q ${MKTEMP_DIR}/tmp.XXXXXXXXXX"
diff --git a/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp b/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp
index 1015a60..782011b 100644
--- a/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp
+++ b/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp
@@ -868,10 +868,10 @@
   const int kSize = 512;
   {
     InternalMmapVector<int> int_buf(kSize);
-    EXPECT_EQ((uptr)kSize, int_buf.size()); // NOLINT
+    EXPECT_EQ((uptr)kSize, int_buf.size());
   }
   InternalMmapVector<char> char_buf(kSize);
-  EXPECT_EQ((uptr)kSize, char_buf.size()); // NOLINT
+  EXPECT_EQ((uptr)kSize, char_buf.size());
   internal_memset(char_buf.data(), 'c', kSize);
   for (int i = 0; i < kSize; i++) {
     EXPECT_EQ('c', char_buf[i]);
diff --git a/lib/sanitizer_common/tests/sanitizer_libc_test.cpp b/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
index 897036c..c3fddc5 100644
--- a/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
+++ b/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
@@ -167,9 +167,7 @@
 class SanitizerCommonFileTest : public ::testing::TestWithParam<uptr> {
   void SetUp() override {
     data_.resize(GetParam());
-    std::generate(data_.begin(), data_.end(), [] {
-      return rand() % 256;  // NOLINT
-    });
+    std::generate(data_.begin(), data_.end(), [] { return rand() % 256; });
 
     temp_file_name(file_name_, sizeof(file_name_),
                    "sanitizer_common.ReadFile.tmp.");
diff --git a/lib/sanitizer_common/tests/sanitizer_printf_test.cpp b/lib/sanitizer_common/tests/sanitizer_printf_test.cpp
index 699a363..d213d10 100644
--- a/lib/sanitizer_common/tests/sanitizer_printf_test.cpp
+++ b/lib/sanitizer_common/tests/sanitizer_printf_test.cpp
@@ -20,12 +20,9 @@
 
 TEST(Printf, Basic) {
   char buf[1024];
-  uptr len = internal_snprintf(buf, sizeof(buf),
-      "a%db%zdc%ue%zuf%xh%zxq%pe%sr",
-      (int)-1, (uptr)-2, // NOLINT
-      (unsigned)-4, (uptr)5, // NOLINT
-      (unsigned)10, (uptr)11, // NOLINT
-      (void*)0x123, "_string_");
+  uptr len = internal_snprintf(
+      buf, sizeof(buf), "a%db%zdc%ue%zuf%xh%zxq%pe%sr", (int)-1, (uptr)-2,
+      (unsigned)-4, (uptr)5, (unsigned)10, (uptr)11, (void *)0x123, "_string_");
   EXPECT_EQ(len, strlen(buf));
 
   std::string expectedString = "a-1b-2c4294967292e5fahbq0x";
@@ -36,7 +33,7 @@
 
 TEST(Printf, OverflowStr) {
   char buf[] = "123456789";
-  uptr len = internal_snprintf(buf, 4, "%s", "abcdef");  // NOLINT
+  uptr len = internal_snprintf(buf, 4, "%s", "abcdef");
   EXPECT_EQ(len, (uptr)6);
   EXPECT_STREQ("abc", buf);
   EXPECT_EQ(buf[3], 0);
@@ -50,7 +47,7 @@
 
 TEST(Printf, OverflowInt) {
   char buf[] = "123456789";
-  internal_snprintf(buf, 4, "%d", -123456789);  // NOLINT
+  internal_snprintf(buf, 4, "%d", -123456789);
   EXPECT_STREQ("-12", buf);
   EXPECT_EQ(buf[3], 0);
   EXPECT_EQ(buf[4], '5');
@@ -69,7 +66,7 @@
   } else {
     val = (uptr)0x123456789ULL;
   }
-  internal_snprintf(buf, 4, "a%zx", val);  // NOLINT
+  internal_snprintf(buf, 4, "a%zx", val);
   EXPECT_STREQ("a12", buf);
   EXPECT_EQ(buf[3], 0);
   EXPECT_EQ(buf[4], '5');
@@ -88,7 +85,7 @@
   } else {
     p = (void*)0x123456789ULL;
   }
-  internal_snprintf(buf, 4, "%p", p);  // NOLINT
+  internal_snprintf(buf, 4, "%p", p);
   EXPECT_STREQ("0x0", buf);
   EXPECT_EQ(buf[3], 0);
   EXPECT_EQ(buf[4], '5');
@@ -115,14 +112,14 @@
 }
 
 TEST(Printf, MinMax) {
-  TestAgainstLibc<int>("%d-%d", INT_MIN, INT_MAX);  // NOLINT
-  TestAgainstLibc<unsigned>("%u-%u", 0, UINT_MAX);  // NOLINT
-  TestAgainstLibc<unsigned>("%x-%x", 0, UINT_MAX);  // NOLINT
+  TestAgainstLibc<int>("%d-%d", INT_MIN, INT_MAX);
+  TestAgainstLibc<unsigned>("%u-%u", 0, UINT_MAX);
+  TestAgainstLibc<unsigned>("%x-%x", 0, UINT_MAX);
 #if !defined(_WIN32)
   // %z* format doesn't seem to be supported by MSVS.
-  TestAgainstLibc<long>("%zd-%zd", LONG_MIN, LONG_MAX);  // NOLINT
-  TestAgainstLibc<unsigned long>("%zu-%zu", 0, ULONG_MAX);  // NOLINT
-  TestAgainstLibc<unsigned long>("%zx-%zx", 0, ULONG_MAX);  // NOLINT
+  TestAgainstLibc<long>("%zd-%zd", LONG_MIN, LONG_MAX);
+  TestAgainstLibc<unsigned long>("%zu-%zu", 0, ULONG_MAX);
+  TestAgainstLibc<unsigned long>("%zx-%zx", 0, ULONG_MAX);
 #endif
 }
 
diff --git a/lib/sanitizer_common/tests/sanitizer_suppressions_test.cpp b/lib/sanitizer_common/tests/sanitizer_suppressions_test.cpp
index 8bbb11c..6fce03a 100644
--- a/lib/sanitizer_common/tests/sanitizer_suppressions_test.cpp
+++ b/lib/sanitizer_common/tests/sanitizer_suppressions_test.cpp
@@ -18,7 +18,7 @@
 
 static bool MyMatch(const char *templ, const char *func) {
   char tmp[1024];
-  strcpy(tmp, templ);  // NOLINT
+  strcpy(tmp, templ);
   return TemplateMatch(tmp, func);
 }
 
@@ -80,43 +80,41 @@
 };
 
 TEST_F(SuppressionContextTest, Parse) {
-  ctx_.Parse("race:foo\n"
-             " 	race:bar\n"  // NOLINT
-             "race:baz	 \n" // NOLINT
-             "# a comment\n"
-             "race:quz\n"); // NOLINT
+  ctx_.Parse(
+      "race:foo\n"
+      " \trace:bar\n"
+      "race:baz\t \n"
+      "# a comment\n"
+      "race:quz\n");
   CheckSuppressions(4, {"race", "race", "race", "race"},
                     {"foo", "bar", "baz", "quz"});
 }
 
 TEST_F(SuppressionContextTest, Parse2) {
   ctx_.Parse(
-    "  	# first line comment\n"  // NOLINT
-    " 	race:bar 	\n"  // NOLINT
-    "race:baz* *baz\n"
-    "# a comment\n"
-    "# last line comment\n"
-  );  // NOLINT
+      "  \t# first line comment\n"
+      " \trace:bar \t\n"
+      "race:baz* *baz\n"
+      "# a comment\n"
+      "# last line comment\n");
   CheckSuppressions(2, {"race", "race"}, {"bar", "baz* *baz"});
 }
 
 TEST_F(SuppressionContextTest, Parse3) {
   ctx_.Parse(
-    "# last suppression w/o line-feed\n"
-    "race:foo\n"
-    "race:bar\r\n"
-    "race:baz"
-  );  // NOLINT
+      "# last suppression w/o line-feed\n"
+      "race:foo\n"
+      "race:bar\r\n"
+      "race:baz");
   CheckSuppressions(3, {"race", "race", "race"}, {"foo", "bar", "baz"});
 }
 
 TEST_F(SuppressionContextTest, ParseType) {
   ctx_.Parse(
-    "race:foo\n"
-    "thread:bar\n"
-    "mutex:baz\n"
-    "signal:quz\n"
-  );  // NOLINT
+      "race:foo\n"
+      "thread:bar\n"
+      "mutex:baz\n"
+      "signal:quz\n");
   CheckSuppressions(4, {"race", "thread", "mutex", "signal"},
                     {"foo", "bar", "baz", "quz"});
 }