[compiler-rt] r173910 - [Sanitizer] update style checker script and fix namespace style warnings
Alexey Samsonov
samsonov at google.com
Tue Jan 29 23:45:58 PST 2013
Author: samsonov
Date: Wed Jan 30 01:45:58 2013
New Revision: 173910
URL: http://llvm.org/viewvc/llvm-project?rev=173910&view=rev
Log:
[Sanitizer] update style checker script and fix namespace style warnings
Modified:
compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc
compiler-rt/trunk/lib/msan/msan_interface_internal.h
compiler-rt/trunk/lib/msan/msan_linux.cc
compiler-rt/trunk/lib/msan/msan_platform_limits_posix.cc
compiler-rt/trunk/lib/msan/msan_report.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_flags.h
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_interface_java.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_vector.h
compiler-rt/trunk/lib/tsan/tests/rtl/tsan_test_util_linux.cc
Modified: compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc Wed Jan 30 01:45:58 2013
@@ -16,7 +16,7 @@ struct YYY {
// CHECK: {{Address 0x.* is .* frame <XXX::YYY::ZZZ(.*)>}}
}
};
-};
+} // namespace XXX
int main(int argc, char **argv) {
int res = XXX::YYY::ZZZ(argc + 10);
Modified: compiler-rt/trunk/lib/msan/msan_interface_internal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_interface_internal.h?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_interface_internal.h (original)
+++ compiler-rt/trunk/lib/msan/msan_interface_internal.h Wed Jan 30 01:45:58 2013
@@ -18,7 +18,6 @@
#include <sanitizer/common_interface_defs.h>
extern "C" {
-
// FIXME: document all interface functions.
SANITIZER_INTERFACE_ATTRIBUTE
@@ -114,7 +113,6 @@ void __msan_partial_poison(void* data, v
// Memory will be marked uninitialized, with origin at the call site.
SANITIZER_INTERFACE_ATTRIBUTE
void __msan_allocated_memory(void* data, uptr size);
-
} // extern "C"
#endif // MSAN_INTERFACE_INTERNAL_H
Modified: compiler-rt/trunk/lib/msan/msan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_linux.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_linux.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_linux.cc Wed Jan 30 01:45:58 2013
@@ -87,6 +87,6 @@ static void MsanAtExit(void) {
void InstallAtExitHandler() {
atexit(MsanAtExit);
}
-}
+} // namespace __msan
#endif // __linux__
Modified: compiler-rt/trunk/lib/msan/msan_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_platform_limits_posix.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_platform_limits_posix.cc Wed Jan 30 01:45:58 2013
@@ -54,6 +54,6 @@ namespace __msan {
uptr __msan_get_socklen_t(void* socklen_ptr) {
return *(socklen_t*)socklen_ptr;
}
-}
+} // namespace __msan
#endif // __linux__
Modified: compiler-rt/trunk/lib/msan/msan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_report.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_report.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_report.cc Wed Jan 30 01:45:58 2013
@@ -97,4 +97,4 @@ void ReportAtExitStatistics() {
}
-} // namespace msan
+} // namespace __msan
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h Wed Jan 30 01:45:58 2013
@@ -68,6 +68,6 @@ struct LFStack {
atomic_uint64_t head_;
};
-}
+} // namespace __sanitizer
#endif // #ifndef SANITIZER_LFSTACK_H
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h Wed Jan 30 01:45:58 2013
@@ -167,6 +167,6 @@ class QuarantineCache {
return b;
}
};
-}
+} // namespace __sanitizer
#endif // #ifndef SANITIZER_QUARANTINE_H
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=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh Wed Jan 30 01:45:58 2013
@@ -13,7 +13,9 @@ fi
# Cpplint setup
cd ${SCRIPT_DIR}
if [ ! -d cpplint ]; then
- svn co -r83 http://google-styleguide.googlecode.com/svn/trunk/cpplint cpplint
+ svn co http://google-styleguide.googlecode.com/svn/trunk/cpplint cpplint
+else
+ (cd cpplint && svn up)
fi
CPPLINT=${SCRIPT_DIR}/cpplint/cpplint.py
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc Wed Jan 30 01:45:58 2013
@@ -96,4 +96,4 @@ TEST(SanitizerCommon, SanitizerSetThread
}
#endif
-} // namespace sanitizer
+} // namespace __sanitizer
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_flags.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_flags.h?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_flags.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_flags.h Wed Jan 30 01:45:58 2013
@@ -86,6 +86,6 @@ struct Flags {
Flags *flags();
void InitializeFlags(Flags *flags, const char *env);
-}
+} // namespace __tsan
#endif // TSAN_FLAGS_H
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=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Wed Jan 30 01:45:58 2013
@@ -127,7 +127,7 @@ struct SignalContext {
int pending_signal_count;
SignalDesc pending_signals[kSigCount];
};
-}
+} // namespace __tsan
static SignalContext *SigCtx(ThreadState *thr) {
SignalContext *ctx = (SignalContext*)thr->signal_ctx;
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interface_java.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interface_java.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interface_java.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interface_java.cc Wed Jan 30 01:45:58 2013
@@ -152,7 +152,7 @@ SyncVar* GetAndRemoveJavaSync(ThreadStat
return 0;
}
-} // namespace __tsan {
+} // namespace __tsan
#define SCOPED_JAVA_FUNC(func) \
ThreadState *thr = cur_thread(); \
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc Wed Jan 30 01:45:58 2013
@@ -242,4 +242,4 @@ MD5Hash md5_hash(const void *data, uptr
MD5_Final((unsigned char*)&res.hash[0], &ctx);
return res;
}
-}
+} // namespace __tsan
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Wed Jan 30 01:45:58 2013
@@ -239,7 +239,7 @@ void Initialize(ThreadState *thr) {
Printf("ThreadSanitizer is suspended at startup (pid %d)."
" Call __tsan_resume().\n",
GetPid());
- while (__tsan_resumed == 0);
+ while (__tsan_resumed == 0) {}
}
}
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_vector.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_vector.h?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_vector.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_vector.h Wed Jan 30 01:45:58 2013
@@ -105,6 +105,6 @@ class Vector {
Vector(const Vector&);
void operator=(const Vector&);
};
-}
+} // namespace __tsan
#endif // #ifndef TSAN_VECTOR_H
Modified: compiler-rt/trunk/lib/tsan/tests/rtl/tsan_test_util_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/tests/rtl/tsan_test_util_linux.cc?rev=173910&r1=173909&r2=173910&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/tests/rtl/tsan_test_util_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/tests/rtl/tsan_test_util_linux.cc Wed Jan 30 01:45:58 2013
@@ -73,7 +73,7 @@ bool OnReport(const ReportDesc *rep, boo
expect_report_reported = true;
return true;
}
-}
+} // namespace __tsan
static void* allocate_addr(int size, int offset_from_aligned = 0) {
static uintptr_t foo;
More information about the llvm-commits
mailing list