llvm-project/compiler-rt/lib
Fangrui Song 2fec8860d8 [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format
Code patterns like this are common, `#` at the line beginning
(https://google.github.io/styleguide/cppguide.html#Preprocessor_Directives),
one space indentation for if/elif/else directives.
```
#if SANITIZER_LINUX
# if defined(__aarch64__)
# endif
#endif
```

However, currently clang-format wants to reformat the code to
```
#if SANITIZER_LINUX
#if defined(__aarch64__)
#endif
#endif
```

This significantly harms readability in my review.  Use `IndentPPDirectives:
AfterHash` to defeat the diagnostic. clang-format will now suggest:

```
#if SANITIZER_LINUX
#  if defined(__aarch64__)
#  endif
#endif
```

Unfortunately there is no clang-format option using indent with 1 for
just preprocessor directives. However, this is still one step forward
from the current behavior.

Reviewed By: #sanitizers, vitalybuka

Differential Revision: https://reviews.llvm.org/D100238
2021-05-03 13:49:41 -07:00
..
BlocksRuntime
asan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
builtins [builtins] Fix ABI-incompatibility with GCC for floating-point compare 2021-04-28 12:19:19 +01:00
cfi [sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks 2020-09-08 10:12:05 -07:00
crt [RISCV][crt] support building without init_array 2020-12-01 17:17:50 +03:00
dfsan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
fuzzer [libFuzzer] Fix off-by-one error in ApplyDictionaryEntry 2021-05-03 10:37:44 -07:00
gwp_asan [gwp_asan] Use __sanitizer_fast_backtrace on Fuchsia 2021-04-28 16:48:14 -07:00
hwasan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
interception [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
lsan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
memprof sanitizer_common: introduce kInvalidTid/kMainTid 2021-04-30 15:58:05 +02:00
msan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
orc [ORC-RT] Re-apply "Initial ORC Runtime directories and build..." with fixes. 2021-04-24 16:00:20 -07:00
profile [gcov] Delete ancient MSVC workaround 2021-03-12 15:10:12 -08:00
safestack [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
sanitizer_common [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
scudo [scudo] Don't track free/use stats for transfer batches. 2021-05-03 11:50:00 -07:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
ubsan [Sanitizers] Fix build 2021-04-17 11:15:31 +01:00
ubsan_minimal [compiler-rt] Suppress -Wunused-result due to ::write when _FORTIFY_SOURCE>0 in glibc 2020-10-12 09:57:12 -07:00
xray [XRay][compiler-rt][x86_64] Fix CFI directives in assembly trampolines 2021-03-06 10:38:27 -08:00
CMakeLists.txt [ORC-RT] Re-apply "Initial ORC Runtime directories and build..." with fixes. 2021-04-24 16:00:20 -07:00