summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/asan/TestCases/alloca_loop_unpoisoning.cpp4
-rw-r--r--test/asan/TestCases/time_interceptor.cpp2
-rw-r--r--test/asan/TestCases/use-after-scope-conversion.cpp2
-rw-r--r--test/asan/TestCases/vla_chrome_testcase.cpp2
-rw-r--r--test/asan/TestCases/vla_loop_overfow.cpp2
-rw-r--r--test/lsan/TestCases/Linux/use_tls_dynamic.cpp2
-rw-r--r--test/tsan/exceptions.cpp24
-rw-r--r--test/tsan/java.h2
-rw-r--r--test/tsan/virtual_inheritance_compile_bug.cpp12
9 files changed, 29 insertions, 23 deletions
diff --git a/test/asan/TestCases/alloca_loop_unpoisoning.cpp b/test/asan/TestCases/alloca_loop_unpoisoning.cpp
index f9d32aafd..a3d7ca1dc 100644
--- a/test/asan/TestCases/alloca_loop_unpoisoning.cpp
+++ b/test/asan/TestCases/alloca_loop_unpoisoning.cpp
@@ -24,11 +24,11 @@ void *top, *bot;
__attribute__((noinline)) void foo(int len) {
char x;
top = &x;
- char array[len]; // NOLINT
+ char array[len];
assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
alloca(len);
for (int i = 0; i < 32; ++i) {
- char array[i]; // NOLINT
+ char array[i];
bot = alloca(i);
assert(!(reinterpret_cast<uintptr_t>(bot) & 31L));
}
diff --git a/test/asan/TestCases/time_interceptor.cpp b/test/asan/TestCases/time_interceptor.cpp
index f78af1056..91e056bfc 100644
--- a/test/asan/TestCases/time_interceptor.cpp
+++ b/test/asan/TestCases/time_interceptor.cpp
@@ -13,7 +13,7 @@ int main() {
time_t *tm = (time_t*)malloc(sizeof(time_t));
free(tm);
time_t t = time(tm);
- printf("Time: %s\n", ctime(&t)); // NOLINT
+ printf("Time: %s\n", ctime(&t));
// CHECK: use-after-free
// Regression check for
// https://code.google.com/p/address-sanitizer/issues/detail?id=321
diff --git a/test/asan/TestCases/use-after-scope-conversion.cpp b/test/asan/TestCases/use-after-scope-conversion.cpp
index b3ab50170..4ada3ba5d 100644
--- a/test/asan/TestCases/use-after-scope-conversion.cpp
+++ b/test/asan/TestCases/use-after-scope-conversion.cpp
@@ -15,7 +15,7 @@ struct B {
struct C {
const char *p;
explicit C(const char *c) : p(c) {}
- C(const B &b) : p(&b.p) {} // NOLINT
+ explicit C(const B &b) : p(&b.p) {}
};
struct A {
diff --git a/test/asan/TestCases/vla_chrome_testcase.cpp b/test/asan/TestCases/vla_chrome_testcase.cpp
index a87718006..613d4bb27 100644
--- a/test/asan/TestCases/vla_chrome_testcase.cpp
+++ b/test/asan/TestCases/vla_chrome_testcase.cpp
@@ -18,7 +18,7 @@ __attribute__((noinline)) void fn3(int *first, int second) {
int main() {
int d = b && c;
- int e[a]; // NOLINT
+ int e[a];
assert(!(reinterpret_cast<uintptr_t>(e) & 31L));
int f;
if (d)
diff --git a/test/asan/TestCases/vla_loop_overfow.cpp b/test/asan/TestCases/vla_loop_overfow.cpp
index b6a5864c0..370e0dc72 100644
--- a/test/asan/TestCases/vla_loop_overfow.cpp
+++ b/test/asan/TestCases/vla_loop_overfow.cpp
@@ -8,7 +8,7 @@
void foo(int index, int len) {
for (int i = 1; i < len; ++i) {
- char array[len]; // NOLINT
+ char array[len];
assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
array[index + i] = 0;
// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
diff --git a/test/lsan/TestCases/Linux/use_tls_dynamic.cpp b/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
index 8093d6f0e..b7ca2d754 100644
--- a/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
+++ b/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) {
// This must be large enough that it doesn't fit into preallocated static TLS
// space (see STATIC_TLS_SURPLUS in glibc).
-__thread void *huge_thread_local_array[(1 << 20) / sizeof(void *)]; // NOLINT
+__thread void *huge_thread_local_array[(1 << 20) / sizeof(void *)];
extern "C" void **StoreToTLS(void *p) {
huge_thread_local_array[0] = p;
diff --git a/test/tsan/exceptions.cpp b/test/tsan/exceptions.cpp
index 193e115f7..386145d32 100644
--- a/test/tsan/exceptions.cpp
+++ b/test/tsan/exceptions.cpp
@@ -11,7 +11,7 @@ __attribute__((noinline)) void throws_int() {
__attribute__((noinline)) void callee_throws() {
try {
throws_int();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "callee_throws caught exception\n");
}
}
@@ -19,7 +19,7 @@ __attribute__((noinline)) void callee_throws() {
__attribute__((noinline)) void throws_catches_rethrows() {
try {
throws_int();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "throws_catches_rethrows caught exception\n");
throw;
}
@@ -28,7 +28,7 @@ __attribute__((noinline)) void throws_catches_rethrows() {
__attribute__((noinline)) void callee_rethrows() {
try {
throws_catches_rethrows();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "callee_rethrows caught exception\n");
}
}
@@ -36,7 +36,7 @@ __attribute__((noinline)) void callee_rethrows() {
__attribute__((noinline)) void throws_and_catches() {
try {
throws_int();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "throws_and_catches caught exception\n");
}
}
@@ -45,10 +45,10 @@ __attribute__((noinline)) void nested_try() {
try {
try {
throws_int();
- } catch (double) { // NOLINT
+ } catch (double) {
fprintf(stderr, "nested_try inner block caught exception\n");
}
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "nested_try outer block caught exception\n");
}
}
@@ -57,10 +57,10 @@ __attribute__((noinline)) void nested_try2() {
try {
try {
throws_int();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "nested_try inner block caught exception\n");
}
- } catch (double) { // NOLINT
+ } catch (double) {
fprintf(stderr, "nested_try outer block caught exception\n");
}
}
@@ -83,7 +83,7 @@ __attribute__((noinline)) void local_object_then_throw() {
__attribute__((noinline)) void cpp_object_with_destructor() {
try {
local_object_then_throw();
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "cpp_object_with_destructor caught exception\n");
}
}
@@ -99,7 +99,7 @@ __attribute__((noinline)) void recursive_call(long n) {
__attribute__((noinline)) void multiframe_unwind() {
try {
recursive_call(5);
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "multiframe_unwind caught exception\n");
}
}
@@ -114,7 +114,7 @@ __attribute__((noinline)) void longjmp_unwind() {
try {
longjmp(env, 42);
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "longjmp_unwind caught exception\n");
}
}
@@ -137,7 +137,7 @@ __attribute__((noinline)) void longjmp_unwind_multiple_frames() {
try {
recursive_call_longjmp(env, 5);
- } catch (int) { // NOLINT
+ } catch (int) {
fprintf(stderr, "longjmp_unwind_multiple_frames caught exception\n");
}
}
diff --git a/test/tsan/java.h b/test/tsan/java.h
index e9aa4ee24..765bae0e8 100644
--- a/test/tsan/java.h
+++ b/test/tsan/java.h
@@ -1,7 +1,7 @@
#include "test.h"
extern "C" {
-typedef unsigned long jptr; // NOLINT
+typedef unsigned long jptr;
void __tsan_java_preinit(const char *libjvm_path);
void __tsan_java_init(jptr heap_begin, jptr heap_size);
int __tsan_java_fini();
diff --git a/test/tsan/virtual_inheritance_compile_bug.cpp b/test/tsan/virtual_inheritance_compile_bug.cpp
index 3b1e08b16..69fda3a00 100644
--- a/test/tsan/virtual_inheritance_compile_bug.cpp
+++ b/test/tsan/virtual_inheritance_compile_bug.cpp
@@ -3,10 +3,16 @@
// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdio.h>
-struct AAA { virtual long aaa () { return 0; } }; // NOLINT
-struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT
+struct AAA {
+ virtual long aaa() { return 0; }
+};
+struct BBB : virtual AAA {
+ unsigned long bbb;
+};
struct CCC: virtual AAA { };
-struct DDD: CCC, BBB { DDD(); }; // NOLINT
+struct DDD : CCC, BBB {
+ DDD();
+};
DDD::DDD() { }
int main() {
DDD d;