Skip to content

Commit f8b8f0d

Browse files
barcharcrazCharlie Barto
authored andcommitted
clang-format everything
1 parent 1cb92a2 commit f8b8f0d

24 files changed

+60
-69
lines changed

compiler-rt/test/asan/TestCases/Windows/crash_read_write.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// RUN: not %run %t write 2>&1 | FileCheck %s --check-prefix=WRITE
44

55
#include "../defines.h"
6-
#include <windows.h>
76
#include <stdio.h>
7+
#include <windows.h>
88

99
static volatile int sink;
1010
ATTRIBUTE_NOINLINE void Read(int *ptr) { sink = *ptr; }

compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ int test_function() {
2323
// CHECK: Initial test OK
2424

2525
memcpy(buff2, buff1, 6);
26-
// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
27-
// CHECK: WRITE of size 6 at [[ADDR]] thread T0
28-
// CHECK-NEXT: __asan_{{.*}}{{(memcpy|memmove)}}
29-
// CHECK-NEXT: test_function {{.*}}dll_intercept_memcpy.cpp:[[@LINE-4]]
30-
// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
31-
// CHECK-NEXT: test_function {{.*}}dll_intercept_memcpy.cpp
32-
// CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
26+
// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
27+
// CHECK: WRITE of size 6 at [[ADDR]] thread T0
28+
// CHECK-NEXT: __asan_{{.*}}{{(memcpy|memmove)}}
29+
// CHECK-NEXT: test_function {{.*}}dll_intercept_memcpy.cpp:[[@LINE-4]]
30+
// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
31+
// CHECK-NEXT: test_function {{.*}}dll_intercept_memcpy.cpp
32+
// CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
3333
return 0;
3434
}

compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ struct C {
1111

1212
int ATTRIBUTE_NOINLINE
1313
#if defined(__clang__) || !defined(_MSC_VER)
14-
__attribute__((optnone))
14+
__attribute__((optnone))
1515
#endif
16-
hide(int x) { return x; }
16+
hide(int x) {
17+
return x;
18+
}
1719

1820
extern "C" __declspec(dllexport)
1921
int test_function() {

compiler-rt/test/asan/TestCases/Windows/issue64990.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// UNSUPPORTED: target={{.*-windows-gnu}}
66

77
#if defined(_MSC_VER) && !defined(__clang__)
8-
#include <string.h>
8+
# include <string.h>
99
#endif
1010

1111
char buff1[6] = "hello";

compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ struct C {
88
~C() {}
99
};
1010
#if defined(_MSC_VER) && !defined(__clang__)
11-
#pragma optimize("", off)
11+
# pragma optimize("", off)
1212
#else
1313
__attribute__((optnone))
1414
#endif
1515
int ATTRIBUTE_NOINLINE hide(int x) { return x; }
1616
#if defined(_MSC_VER) && !defined(__clang__)
17-
#pragma optimize("", on)
17+
# pragma optimize("", on)
1818
#endif
1919
int main() {
2020
C *buffer = new C[42];

compiler-rt/test/asan/TestCases/Windows/unsymbolized.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// REQUIRES: lld-available
1010

1111
#include "../defines.h"
12-
#include <stdlib.h>
1312
#include <stdio.h>
13+
#include <stdlib.h>
1414
int ATTRIBUTE_NOINLINE do_uaf(void);
1515
int main() {
1616
int r = do_uaf();

compiler-rt/test/asan/TestCases/alloca_constant_size.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <string.h>
99
#include <stdlib.h>
1010
#ifdef _MSC_VER
11-
#include <malloc.h>
11+
# include <malloc.h>
1212
#endif
1313

1414
// MSVC provides _alloca instead of alloca.

compiler-rt/test/asan/TestCases/alloca_detect_custom_size_.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <assert.h>
77
#include <stdint.h>
88
#if defined(_MSC_VER) && !defined(__clang__)
9-
#include <malloc.h>
9+
# include <malloc.h>
1010
#endif
1111

1212
struct A {
@@ -18,7 +18,7 @@ ATTRIBUTE_NOINLINE void foo(int index, int len) {
1818
#if !defined(_MSC_VER) || defined(__clang__)
1919
volatile struct A str[len] ATTRIBUTE_ALIGNED(32);
2020
#else
21-
volatile struct A *str = (volatile struct A*)_alloca(len * sizeof(struct A));
21+
volatile struct A *str = (volatile struct A *)_alloca(len * sizeof(struct A));
2222
#endif
2323
assert(!(reinterpret_cast<uintptr_t>(str) & 31L));
2424
str[index].a[0] = '1'; // BOOM

compiler-rt/test/asan/TestCases/alloca_loop_unpoisoning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
// UNSUPPORTED: MSVC
88

99
#include "defines.h"
10+
#include "sanitizer/asan_interface.h"
1011
#include <assert.h>
1112
#include <stdint.h>
1213
#include <stdlib.h>
13-
#include "sanitizer/asan_interface.h"
1414

1515
// MSVC provides _alloca instead of alloca.
1616
#if defined(_MSC_VER) && !defined(alloca)

compiler-rt/test/asan/TestCases/coverage-trace-pc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ extern "C" void __sanitizer_cov_trace_pc_indir(void *callee) {
1414
last_callee = callee;
1515
}
1616
#else
17-
#include "defines.h"
18-
#include <stdio.h>
19-
#include <assert.h>
17+
# include "defines.h"
18+
# include <assert.h>
19+
# include <stdio.h>
2020
extern int pc_count;
2121
extern void *last_callee;
2222

0 commit comments

Comments
 (0)