summaryrefslogtreecommitdiff
path: root/test/tsan
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2019-09-11 23:19:48 +0000
committerVitaly Buka <vitalybuka@google.com>2019-09-11 23:19:48 +0000
commit17b6c662f2f60ad2e5522694df32bde9e71c7725 (patch)
tree937fc76e3cced266c2c8846e31022b7e39cab6ec /test/tsan
parentd40d1324c710f029866cd872825b728859d3d21f (diff)
downloadcompiler-rt-17b6c662f2f60ad2e5522694df32bde9e71c7725.tar.gz
Remove NOLINTs from compiler-rt
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@371687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan')
-rw-r--r--test/tsan/exceptions.cpp24
-rw-r--r--test/tsan/java.h2
-rw-r--r--test/tsan/virtual_inheritance_compile_bug.cpp12
3 files changed, 22 insertions, 16 deletions
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;