Skip to content

Commit e6017b5

Browse files
committed
update formatting
1 parent a43e25e commit e6017b5

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

compiler-rt/lib/nsan/nsan_flags.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ NSAN_FLAG(bool, enable_loadtracking_stats, false,
4747
"memory, the number of times nsan resumed from the original value "
4848
"due to invalid or unknown types.")
4949
NSAN_FLAG(bool, print_stats_on_exit, false, "If true, print stats on exit.")
50-
NSAN_FLAG(bool, check_nan, false, "If true, check the floating-point number is nan")
50+
NSAN_FLAG(bool, check_nan, false,
51+
"If true, check the floating-point number is nan")

compiler-rt/test/nsan/nan.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
// RUN: %clangxx_nsan -O0 -g %s -o %t
22
// RUN: NSAN_OPTIONS=check_nan=true %run %t 2>&1 | FileCheck %s
33

4-
5-
#include<cmath>
6-
#include<cstdio>
4+
#include <cmath>
5+
#include <cstdio>
76

87
// This function returns a NaN value for triggering the NaN detection.
9-
__attribute__((noinline))
10-
float ReturnNaN() {
8+
__attribute__((noinline)) float ReturnNaN() {
119
float ret = 0.0 / 0.0;
1210
return ret;
1311
// CHECK: WARNING: NumericalStabilitySanitizer: NaN detected
1412
}
1513

16-
1714
int main() {
1815
float val = ReturnNaN();
1916
printf("val: %f\n", val);

0 commit comments

Comments
 (0)