llvm-project/compiler-rt/lib/interception
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
..
tests [sanitizer] Remove -Wno-non-virtual-dtor 2020-11-04 00:51:33 -08:00
.clang-format [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format 2021-05-03 13:49:41 -07:00
CMakeLists.txt compiler-rt: Rename .cc files in lib/interception to .cpp. 2019-07-31 18:01:55 +00:00
interception.h [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
interception_linux.cpp [sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl 2021-01-06 10:55:40 -08:00
interception_linux.h [sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl 2021-01-06 10:55:40 -08:00
interception_mac.cpp compiler-rt: Rename .cc files in lib/interception to .cpp. 2019-07-31 18:01:55 +00:00
interception_mac.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
interception_type_test.cpp compiler-rt: Rename .cc files in lib/interception to .cpp. 2019-07-31 18:01:55 +00:00
interception_win.cpp [compiler-rt] [windows] Add UNUSED attributes on variables/functions only used for 64 bit targets 2021-01-05 08:59:08 +02:00
interception_win.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00