forked from OSchip/llvm-project
2fec8860d8
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 |
||
---|---|---|
.. | ||
scripts | ||
.clang-format | ||
CMakeLists.txt | ||
hwasan.cpp | ||
hwasan.h | ||
hwasan.syms.extra | ||
hwasan_allocator.cpp | ||
hwasan_allocator.h | ||
hwasan_blacklist.txt | ||
hwasan_checks.h | ||
hwasan_dynamic_shadow.cpp | ||
hwasan_dynamic_shadow.h | ||
hwasan_exceptions.cpp | ||
hwasan_flags.h | ||
hwasan_flags.inc | ||
hwasan_globals.cpp | ||
hwasan_globals.h | ||
hwasan_interceptors.cpp | ||
hwasan_interceptors_vfork.S | ||
hwasan_interface_internal.h | ||
hwasan_linux.cpp | ||
hwasan_malloc_bisect.h | ||
hwasan_mapping.h | ||
hwasan_memintrinsics.cpp | ||
hwasan_new_delete.cpp | ||
hwasan_poisoning.cpp | ||
hwasan_poisoning.h | ||
hwasan_report.cpp | ||
hwasan_report.h | ||
hwasan_setjmp.S | ||
hwasan_tag_mismatch_aarch64.S | ||
hwasan_thread.cpp | ||
hwasan_thread.h | ||
hwasan_thread_list.cpp | ||
hwasan_thread_list.h | ||
hwasan_type_test.cpp |