[llvm-commits] [compiler-rt] r172817 - in /compiler-rt/trunk/lib: asan/asan_intercepted_functions.h asan/asan_interceptors.cc msan/msan_interceptors.cc sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc tsan/rtl/tsan_interceptors.cc
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jan 18 05:12:56 PST 2013
Author: eugenis
Date: Fri Jan 18 07:12:56 2013
New Revision: 172817
URL: http://llvm.org/viewvc/llvm-project?rev=172817&view=rev
Log:
[sanitizer] lint
Modified:
compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/lib/msan/msan_interceptors.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_intercepted_functions.h?rev=172817&r1=172816&r2=172817&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_intercepted_functions.h (original)
+++ compiler-rt/trunk/lib/asan/asan_intercepted_functions.h Fri Jan 18 07:12:56 2013
@@ -235,8 +235,9 @@
DECLARE_FUNCTION_AND_WRAPPER(int, vfscanf, void *stream, const char *format,
va_list ap);
DECLARE_FUNCTION_AND_WRAPPER(int, scanf, const char *format, ...);
-DECLARE_FUNCTION_AND_WRAPPER(int, fscanf, void* stream, const char *format, ...);
-DECLARE_FUNCTION_AND_WRAPPER(int, sscanf,
+DECLARE_FUNCTION_AND_WRAPPER(int, fscanf,
+ void* stream, const char *format, ...);
+DECLARE_FUNCTION_AND_WRAPPER(int, sscanf, // NOLINT
const char *str, const char *format, ...);
#if MAC_INTERPOSE_FUNCTIONS && !defined(MISSING_BLOCKS_SUPPORT)
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=172817&r1=172816&r2=172817&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Fri Jan 18 07:12:56 2013
@@ -86,10 +86,15 @@
// ---------------------- Wrappers ---------------- {{{1
using namespace __asan; // NOLINT
-#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) ASAN_WRITE_RANGE(ptr, size)
+#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \
+ ASAN_WRITE_RANGE(ptr, size)
#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) ASAN_READ_RANGE(ptr, size)
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
- do {ctx = 0; (void)ctx; ENSURE_ASAN_INITED();} while (false)
+ do { \
+ ctx = 0; \
+ (void)ctx; \
+ ENSURE_ASAN_INITED(); \
+ } while (false)
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) SetThreadName(name)
Modified: compiler-rt/trunk/lib/msan/msan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_interceptors.cc?rev=172817&r1=172816&r2=172817&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_interceptors.cc Fri Jan 18 07:12:56 2013
@@ -739,10 +739,15 @@
__msan_unpoison(ptr, size)
#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) do { } while (false)
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
- do {ctx = 0; (void)ctx; ENSURE_MSAN_INITED();} while (false)
+ do { \
+ ctx = 0; \
+ (void)ctx; \
+ ENSURE_MSAN_INITED(); \
+ } while (false)
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) do { } while (false)
-#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) do { } while (false) // FIXME
+#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) \
+ do { } while (false) // FIXME
#include "sanitizer_common/sanitizer_common_interceptors.inc"
// static
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc?rev=172817&r1=172816&r2=172817&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc Fri Jan 18 07:12:56 2013
@@ -51,13 +51,13 @@
}
TEST(SanitizerCommonInterceptors, Scanf) {
- const unsigned I = sizeof(int);
- const unsigned L = sizeof(long);
- const unsigned LL = sizeof(long long);
- const unsigned S = sizeof(short);
- const unsigned C = sizeof(char);
- const unsigned D = sizeof(double);
- const unsigned F = sizeof(float);
+ const unsigned I = sizeof(int); // NOLINT
+ const unsigned L = sizeof(long); // NOLINT
+ const unsigned LL = sizeof(long long); // NOLINT
+ const unsigned S = sizeof(short); // NOLINT
+ const unsigned C = sizeof(char); // NOLINT
+ const unsigned D = sizeof(double); // NOLINT
+ const unsigned F = sizeof(float); // NOLINT
testScanf("%d", 1, I);
testScanf("%d%d%d", 3, I, I, I);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=172817&r1=172816&r2=172817&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Fri Jan 18 07:12:56 2013
@@ -1611,7 +1611,8 @@
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
SCOPED_TSAN_INTERCEPTOR(func, __VA_ARGS__) \
TsanInterceptorContext _ctx = {thr, caller_pc, pc}; \
- ctx = (void*)&_ctx; (void)ctx;
+ ctx = (void*)&_ctx; \
+ (void)ctx;
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) \
FdAcquire(((TsanInterceptorContext*)ctx)->thr, pc, fd)
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) \
More information about the llvm-commits
mailing list