[llvm-commits] [compiler-rt] r162909 - in /compiler-rt/trunk/lib: asan/asan_allocator.cc asan/asan_allocator.h asan/asan_thread.h asan/tests/asan_test_utils.h tsan/output_tests/simple_stack2.cc tsan/output_tests/static_init2.cc tsan/output_tests/static_init4.cc tsan/output_tests/static_init5.cc tsan/output_tests/virtual_inheritance_compile_bug.cc
Alexey Samsonov
samsonov at google.com
Thu Aug 30 07:22:21 PDT 2012
Author: samsonov
Date: Thu Aug 30 09:22:21 2012
New Revision: 162909
URL: http://llvm.org/viewvc/llvm-project?rev=162909&view=rev
Log:
Whitespace/lint
Modified:
compiler-rt/trunk/lib/asan/asan_allocator.cc
compiler-rt/trunk/lib/asan/asan_allocator.h
compiler-rt/trunk/lib/asan/asan_thread.h
compiler-rt/trunk/lib/asan/tests/asan_test_utils.h
compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc
compiler-rt/trunk/lib/tsan/output_tests/static_init2.cc
compiler-rt/trunk/lib/tsan/output_tests/static_init4.cc
compiler-rt/trunk/lib/tsan/output_tests/static_init5.cc
compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc
Modified: compiler-rt/trunk/lib/asan/asan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.cc Thu Aug 30 09:22:21 2012
@@ -316,7 +316,6 @@
class MallocInfo {
public:
-
explicit MallocInfo(LinkerInitialized x) : mu_(x) { }
AsanChunk *AllocateChunks(u8 size_class, uptr n_chunks) {
Modified: compiler-rt/trunk/lib/asan/asan_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.h?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.h (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.h Thu Aug 30 09:22:21 2012
@@ -108,6 +108,7 @@
// Return the bottom of the maped region.
uptr AddrIsInFakeStack(uptr addr);
bool StackSize() { return stack_size_; }
+
private:
static const uptr kMinStackFrameSizeLog = 9; // Min frame is 512B.
static const uptr kMaxStackFrameSizeLog = 16; // Max stack frame is 64K.
Modified: compiler-rt/trunk/lib/asan/asan_thread.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_thread.h?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_thread.h (original)
+++ compiler-rt/trunk/lib/asan/asan_thread.h Thu Aug 30 09:22:21 2012
@@ -91,7 +91,6 @@
AsanStats &stats() { return stats_; }
private:
-
void SetThreadStackTopAndBottom();
void ClearShadowForThreadStack();
AsanThreadSummary *summary_;
Modified: compiler-rt/trunk/lib/asan/tests/asan_test_utils.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test_utils.h?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test_utils.h (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test_utils.h Thu Aug 30 09:22:21 2012
@@ -41,7 +41,7 @@
#endif
// Make the compiler think that something is going on there.
-extern "C" void break_optimization(void *);
+extern "C" void break_optimization(void *arg);
// This function returns its parameter but in such a way that compiler
// can not prove it.
Modified: compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc Thu Aug 30 09:22:21 2012
@@ -9,16 +9,22 @@
}
void __attribute__((noinline)) bar1() {
- volatile int tmp = 42; int tmp2 = tmp; (void)tmp2;
+ volatile int tmp = 42;
+ int tmp2 = tmp;
+ (void)tmp2;
foo1();
}
void __attribute__((noinline)) foo2() {
- volatile int tmp = Global; int tmp2 = tmp; (void)tmp2;
+ volatile int tmp = Global;
+ int tmp2 = tmp;
+ (void)tmp2;
}
void __attribute__((noinline)) bar2() {
- volatile int tmp = 42; int tmp2 = tmp; (void)tmp2;
+ volatile int tmp = 42;
+ int tmp2 = tmp;
+ (void)tmp2;
foo2();
}
@@ -38,9 +44,9 @@
// CHECK: WARNING: ThreadSanitizer: data race
// CHECK-NEXT: Write of size 4 at {{.*}} by thread 1:
// CHECK-NEXT: #0 foo1{{.*}} {{.*}}simple_stack2.cc:8{{(:3)?}} ({{.*}})
-// CHECK-NEXT: #1 bar1{{.*}} {{.*}}simple_stack2.cc:13{{(:3)?}} ({{.*}})
-// CHECK-NEXT: #2 Thread1{{.*}} {{.*}}simple_stack2.cc:27{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #1 bar1{{.*}} {{.*}}simple_stack2.cc:15{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 Thread1{{.*}} {{.*}}simple_stack2.cc:33{{(:3)?}} ({{.*}})
// CHECK: Previous read of size 4 at {{.*}} by main thread:
-// CHECK-NEXT: #0 foo2{{.*}} {{.*}}simple_stack2.cc:17{{(:28)?}} ({{.*}})
-// CHECK-NEXT: #1 bar2{{.*}} {{.*}}simple_stack2.cc:22{{(:3)?}} ({{.*}})
-// CHECK-NEXT: #2 main{{.*}} {{.*}}simple_stack2.cc:34{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #0 foo2{{.*}} {{.*}}simple_stack2.cc:19{{(:28)?}} ({{.*}})
+// CHECK-NEXT: #1 bar2{{.*}} {{.*}}simple_stack2.cc:28{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 main{{.*}} {{.*}}simple_stack2.cc:40{{(:3)?}} ({{.*}})
Modified: compiler-rt/trunk/lib/tsan/output_tests/static_init2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/static_init2.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/static_init2.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/static_init2.cc Thu Aug 30 09:22:21 2012
@@ -4,7 +4,7 @@
struct Cache {
int x;
- Cache(int x)
+ explicit Cache(int x)
: x(x) {
}
};
Modified: compiler-rt/trunk/lib/tsan/output_tests/static_init4.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/static_init4.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/static_init4.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/static_init4.cc Thu Aug 30 09:22:21 2012
@@ -5,7 +5,7 @@
struct Cache {
int x;
- Cache(int x)
+ explicit Cache(int x)
: x(x) {
}
};
Modified: compiler-rt/trunk/lib/tsan/output_tests/static_init5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/static_init5.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/static_init5.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/static_init5.cc Thu Aug 30 09:22:21 2012
@@ -5,7 +5,7 @@
struct Cache {
int x;
- Cache(int x)
+ explicit Cache(int x)
: x(x) {
}
};
Modified: compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc?rev=162909&r1=162908&r2=162909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc Thu Aug 30 09:22:21 2012
@@ -1,10 +1,10 @@
// Regression test for http://code.google.com/p/thread-sanitizer/issues/detail?id=3.
// The C++ variant is much more compact that the LLVM IR equivalent.
#include <stdio.h>
-struct AAA { virtual long aaa () { return 0; } };
-struct BBB: virtual AAA { unsigned long bbb; };
+struct AAA { virtual long aaa () { return 0; } }; // NOLINT
+struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT
struct CCC: virtual AAA { };
-struct DDD: CCC, BBB { DDD (); };
+struct DDD: CCC, BBB { DDD(); }; // NOLINT
DDD::DDD() { }
int main() {
DDD d;
More information about the llvm-commits
mailing list