[llvm-commits] [compiler-rt] r172825 - in /compiler-rt/trunk/lib/sanitizer_common: sanitizer_common_interceptors.inc sanitizer_common_interceptors_scanf.inc scripts/check_lint.sh
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jan 18 07:53:43 PST 2013
Author: eugenis
Date: Fri Jan 18 09:53:43 2013
New Revision: 172825
URL: http://llvm.org/viewvc/llvm-project?rev=172825&view=rev
Log:
[sanitizer] Enable cpplint for .inc files.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc
compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=172825&r1=172824&r2=172825&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Fri Jan 18 09:53:43 2013
@@ -195,7 +195,7 @@
INTERCEPTOR(int, sscanf, const char *str, const char *format, ...) { // NOLINT
void* ctx;
- COMMON_INTERCEPTOR_ENTER(ctx, sscanf, str, format);
+ COMMON_INTERCEPTOR_ENTER(ctx, sscanf, str, format); // NOLINT
va_list ap;
va_start(ap, format);
int res = vsscanf(str, format, ap); // NOLINT
@@ -204,11 +204,11 @@
}
#define INIT_SCANF \
- INTERCEPT_FUNCTION(scanf); \
- INTERCEPT_FUNCTION(sscanf); \
- INTERCEPT_FUNCTION(fscanf); \
- INTERCEPT_FUNCTION(vscanf); \
- INTERCEPT_FUNCTION(vsscanf); \
+ INTERCEPT_FUNCTION(scanf); \
+ INTERCEPT_FUNCTION(sscanf); /* NOLINT */ \
+ INTERCEPT_FUNCTION(fscanf); \
+ INTERCEPT_FUNCTION(vscanf); \
+ INTERCEPT_FUNCTION(vsscanf); \
INTERCEPT_FUNCTION(vfscanf)
#else
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc?rev=172825&r1=172824&r2=172825&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc Fri Jan 18 09:53:43 2013
@@ -103,7 +103,7 @@
++p;
continue;
}
-
+
if (*p == 'L' || *p == 'q') {
++p;
size = match_spec(scanf_llspecs, scanf_llspecs_cnt, *p);
Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh?rev=172825&r1=172824&r2=172825&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh Fri Jan 18 09:53:43 2013
@@ -26,6 +26,7 @@
TSAN_TEST_LINT_FILTER=${TSAN_RTL_LINT_FILTER},-runtime/threadsafe_fn,-runtime/int
TSAN_LIT_TEST_LINT_FILTER=${TSAN_TEST_LINT_FILTER},-whitespace/line_length
MSAN_RTL_LINT_FILTER=-legal/copyright,-build/include,-readability/casting,-build/header_guard,-build/namespaces
+TSAN_RTL_INC_LINT_FILTER=${TSAN_TEST_LINT_FILTER},-runtime/sizeof
cd ${LLVM_CHECKOUT}
@@ -63,6 +64,17 @@
${CPPLINT} --filter=${TSAN_TEST_LINT_FILTER} ${TSAN_RTL}/tests/rtl/*.{cc,h} \
${TSAN_RTL}/tests/unit/*.cc
${CPPLINT} --filter=${TSAN_LIT_TEST_LINT_FILTER} ${TSAN_RTL}/lit_tests/*.cc
+
# MSan
MSAN_RTL=${COMPILER_RT}/lib/msan
${CPPLINT} --filter=${MSAN_RTL_LINT_FILTER} ${MSAN_RTL}/*.{cc,h}
+
+# Misc files
+FILES=${COMMON_RTL}/*.inc
+for FILE in $FILES; do
+ TMPFILE=$(mktemp --tmpdir $(basename $FILE)_XXXXX.cc)
+ echo "Checking $FILE"
+ cp -f $FILE $TMPFILE
+ ${CPPLINT} --filter=${TSAN_RTL_INC_LINT_FILTER} $TMPFILE
+ rm $TMPFILE
+done
More information about the llvm-commits
mailing list