Skip to content

Commit 44c83ec

Browse files
committed
[sanitizer] Remove cpplint annotations
cpplint was removed by D107197 Differential Revision: https://reviews.llvm.org/D107198
1 parent 634b086 commit 44c83ec

15 files changed

+33
-33
lines changed

compiler-rt/include/sanitizer/dfsan_interface.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ int dfsan_get_track_origins(void);
150150
#ifdef __cplusplus
151151
} // extern "C"
152152

153-
template <typename T>
154-
void dfsan_set_label(dfsan_label label, T &data) { // NOLINT
153+
template <typename T> void dfsan_set_label(dfsan_label label, T &data) {
155154
dfsan_set_label(label, (void *)&data, sizeof(T));
156155
}
157156

compiler-rt/lib/dfsan/dfsan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void dfsan_mem_origin_transfer(const void *dst, const void *src, uptr len);
4949
} // extern "C"
5050

5151
template <typename T>
52-
void dfsan_set_label(dfsan_label label, T &data) { // NOLINT
52+
void dfsan_set_label(dfsan_label label, T &data) {
5353
dfsan_set_label(label, (void *)&data, sizeof(T));
5454
}
5555

compiler-rt/lib/dfsan/dfsan_custom.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ SANITIZER_INTERFACE_ATTRIBUTE char *__dfsw_strcat(char *dest, const char *src,
583583
dfsan_label src_label,
584584
dfsan_label *ret_label) {
585585
size_t dest_len = strlen(dest);
586-
char *ret = strcat(dest, src); // NOLINT
586+
char *ret = strcat(dest, src);
587587
dfsan_label *sdest = shadow_for(dest + dest_len);
588588
const dfsan_label *ssrc = shadow_for(src);
589589
internal_memcpy((void *)sdest, (const void *)ssrc,
@@ -597,7 +597,7 @@ SANITIZER_INTERFACE_ATTRIBUTE char *__dfso_strcat(
597597
dfsan_label *ret_label, dfsan_origin dest_origin, dfsan_origin src_origin,
598598
dfsan_origin *ret_origin) {
599599
size_t dest_len = strlen(dest);
600-
char *ret = strcat(dest, src); // NOLINT
600+
char *ret = strcat(dest, src);
601601
dfsan_label *sdest = shadow_for(dest + dest_len);
602602
const dfsan_label *ssrc = shadow_for(src);
603603
size_t src_len = strlen(src);
@@ -1088,7 +1088,7 @@ int __dfso_getrusage(int who, struct rusage *usage, dfsan_label who_label,
10881088
SANITIZER_INTERFACE_ATTRIBUTE
10891089
char *__dfsw_strcpy(char *dest, const char *src, dfsan_label dst_label,
10901090
dfsan_label src_label, dfsan_label *ret_label) {
1091-
char *ret = strcpy(dest, src); // NOLINT
1091+
char *ret = strcpy(dest, src);
10921092
if (ret) {
10931093
internal_memcpy(shadow_for(dest), shadow_for(src),
10941094
sizeof(dfsan_label) * (strlen(src) + 1));
@@ -1102,7 +1102,7 @@ char *__dfso_strcpy(char *dest, const char *src, dfsan_label dst_label,
11021102
dfsan_label src_label, dfsan_label *ret_label,
11031103
dfsan_origin dst_origin, dfsan_origin src_origin,
11041104
dfsan_origin *ret_origin) {
1105-
char *ret = strcpy(dest, src); // NOLINT
1105+
char *ret = strcpy(dest, src);
11061106
if (ret) {
11071107
size_t str_len = strlen(src) + 1;
11081108
dfsan_mem_origin_transfer(dest, src, str_len);

compiler-rt/lib/dfsan/dfsan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ INTERCEPTOR(uptr, malloc_usable_size, void *ptr) {
152152
if (__dfsan::dfsan_init_is_running) \
153153
return REAL(func)(__VA_ARGS__); \
154154
ENSURE_DFSAN_INITED(); \
155-
dfsan_set_label(0, __errno_location(), sizeof(int)); /* NOLINT */
155+
dfsan_set_label(0, __errno_location(), sizeof(int));
156156

157157
INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags,
158158
int fd, OFF_T offset) {

compiler-rt/lib/msan/msan_interceptors.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,14 +1278,15 @@ int OnExit() {
12781278
CHECK_UNPOISONED_CTX(ctx, ptr, size)
12791279
#define COMMON_INTERCEPTOR_INITIALIZE_RANGE(ptr, size) \
12801280
__msan_unpoison(ptr, size)
1281-
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
1282-
if (msan_init_is_running) return REAL(func)(__VA_ARGS__); \
1283-
ENSURE_MSAN_INITED(); \
1284-
MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \
1285-
ctx = (void *)&msan_ctx; \
1286-
(void)ctx; \
1287-
InterceptorScope interceptor_scope; \
1288-
__msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */
1281+
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
1282+
if (msan_init_is_running) \
1283+
return REAL(func)(__VA_ARGS__); \
1284+
ENSURE_MSAN_INITED(); \
1285+
MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \
1286+
ctx = (void *)&msan_ctx; \
1287+
(void)ctx; \
1288+
InterceptorScope interceptor_scope; \
1289+
__msan_unpoison(__errno_location(), sizeof(int));
12891290
#define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \
12901291
do { \
12911292
} while (false)

compiler-rt/lib/msan/tests/msan_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4318,8 +4318,8 @@ TEST(MemorySanitizerOrigins, InitializedStoreDoesNotChangeOrigin) {
43184318
template<class T, class BinaryOp>
43194319
ALWAYS_INLINE
43204320
void BinaryOpOriginTest(BinaryOp op) {
4321-
U4 ox = rand(); //NOLINT
4322-
U4 oy = rand(); //NOLINT
4321+
U4 ox = rand();
4322+
U4 oy = rand();
43234323
T *x = GetPoisonedO<T>(0, ox, 0);
43244324
T *y = GetPoisonedO<T>(1, oy, 0);
43254325
T *z = GetPoisonedO<T>(2, 0, 0);

compiler-rt/lib/sanitizer_common/sanitizer_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#if defined(__ELF__) && (defined(__GNU__) || defined(__FreeBSD__) || \
6262
defined(__Fuchsia__) || defined(__linux__))
6363
// clang-format off
64-
#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits // NOLINT
64+
#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
6565
// clang-format on
6666
#else
6767
#define NO_EXEC_STACK_DIRECTIVE

compiler-rt/lib/sanitizer_common/sanitizer_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ class ArrayRef {
10731073
} // namespace __sanitizer
10741074

10751075
inline void *operator new(__sanitizer::operator_new_size_type size,
1076-
__sanitizer::LowLevelAllocator &alloc) { // NOLINT
1076+
__sanitizer::LowLevelAllocator &alloc) {
10771077
return alloc.Allocate(size);
10781078
}
10791079

compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ static void ioctl_table_fill() {
14061406
_(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz);
14071407
_(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz);
14081408
#undef _
1409-
} // NOLINT
1409+
}
14101410

14111411
static bool ioctl_initialized = false;
14121412

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
#define SANITIZER_INTERCEPT_PPOLL SI_LINUX_NOT_ANDROID || SI_SOLARIS
310310
#define SANITIZER_INTERCEPT_WORDEXP \
311311
(SI_FREEBSD || SI_NETBSD || (SI_MAC && !SI_IOS) || SI_LINUX_NOT_ANDROID || \
312-
SI_SOLARIS) // NOLINT
312+
SI_SOLARIS)
313313
#define SANITIZER_INTERCEPT_SIGWAIT SI_POSIX
314314
#define SANITIZER_INTERCEPT_SIGWAITINFO SI_LINUX_NOT_ANDROID || SI_SOLARIS
315315
#define SANITIZER_INTERCEPT_SIGTIMEDWAIT SI_LINUX_NOT_ANDROID || SI_SOLARIS
@@ -337,7 +337,7 @@
337337
#define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
338338
#define SANITIZER_INTERCEPT_SHMCTL \
339339
(((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && SANITIZER_WORDSIZE == 64) || \
340-
SI_NETBSD || SI_SOLARIS) // NOLINT
340+
SI_NETBSD || SI_SOLARIS)
341341
#define SANITIZER_INTERCEPT_RANDOM_R SI_GLIBC
342342
#define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
343343
#define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETINHERITSCHED \

compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TEST(Printf, Basic) {
3737

3838
TEST(Printf, OverflowStr) {
3939
char buf[] = "123456789";
40-
uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); // NOLINT
40+
uptr len = internal_snprintf(buf, 4, "%s", "abcdef");
4141
EXPECT_EQ(len, (uptr)6);
4242
EXPECT_STREQ("abc", buf);
4343
EXPECT_EQ(buf[3], 0);
@@ -51,7 +51,7 @@ TEST(Printf, OverflowStr) {
5151

5252
TEST(Printf, OverflowInt) {
5353
char buf[] = "123456789";
54-
internal_snprintf(buf, 4, "%d", -123456789); // NOLINT
54+
internal_snprintf(buf, 4, "%d", -123456789);
5555
EXPECT_STREQ("-12", buf);
5656
EXPECT_EQ(buf[3], 0);
5757
EXPECT_EQ(buf[4], '5');
@@ -70,7 +70,7 @@ TEST(Printf, OverflowUint) {
7070
} else {
7171
val = (uptr)0x123456789ULL;
7272
}
73-
internal_snprintf(buf, 4, "a%zx", val); // NOLINT
73+
internal_snprintf(buf, 4, "a%zx", val);
7474
EXPECT_STREQ("a12", buf);
7575
EXPECT_EQ(buf[3], 0);
7676
EXPECT_EQ(buf[4], '5');
@@ -89,7 +89,7 @@ TEST(Printf, OverflowPtr) {
8989
} else {
9090
p = (void*)0x123456789ULL;
9191
}
92-
internal_snprintf(buf, 4, "%p", p); // NOLINT
92+
internal_snprintf(buf, 4, "%p", p);
9393
EXPECT_STREQ("0x0", buf);
9494
EXPECT_EQ(buf[3], 0);
9595
EXPECT_EQ(buf[4], '5');
@@ -153,7 +153,7 @@ TEST(Printf, Precision) {
153153
EXPECT_STREQ("12345 ", buf);
154154
// Check that width does not overflow the smaller buffer, although
155155
// 10 chars is requested, it stops at the buffer size, 8.
156-
len = internal_snprintf(buf, 8, "%-10s", "12345"); // NOLINT
156+
len = internal_snprintf(buf, 8, "%-10s", "12345");
157157
EXPECT_EQ(10U, len); // The required size reported.
158158
EXPECT_STREQ("12345 ", buf);
159159
}

compiler-rt/lib/tsan/rtl/tsan_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ SANITIZER_INTERFACE_ATTRIBUTE
9595
void __tsan_write_range(void *addr, unsigned long size);
9696

9797
SANITIZER_INTERFACE_ATTRIBUTE
98-
void __tsan_read_range_pc(void *addr, unsigned long size, void *pc); // NOLINT
98+
void __tsan_read_range_pc(void *addr, unsigned long size, void *pc);
9999
SANITIZER_INTERFACE_ATTRIBUTE
100-
void __tsan_write_range_pc(void *addr, unsigned long size, void *pc); // NOLINT
100+
void __tsan_write_range_pc(void *addr, unsigned long size, void *pc);
101101

102102
// User may provide function that would be called right when TSan detects
103103
// an error. The argument 'report' is an opaque pointer that can be used to

compiler-rt/test/asan/TestCases/vla_condition_overflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
__attribute__((noinline)) void foo(int index, int len) {
1010
if (index > len) {
11-
char str[len]; //NOLINT
11+
char str[len];
1212
assert(!(reinterpret_cast<uintptr_t>(str) & 31L));
1313
str[index] = '1'; // BOOM
1414
// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]

compiler-rt/test/lsan/TestCases/use_globals_unused.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifdef TEST_LIB
1616

1717
void set(char *a) {
18-
strcpy(a, "hello"); // NOLINT
18+
strcpy(a, "hello");
1919
}
2020

2121
#else

compiler-rt/utils/generate_netbsd_ioctls.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ END {
337337
}
338338

339339
pcmd("#undef _")
340-
pcmd("} // NOLINT")
340+
pcmd("}")
341341
pcmd("")
342342
pcmd("static bool ioctl_initialized = false;")
343343
pcmd("")

0 commit comments

Comments
 (0)