From 5a812bf5197e3394b92f5df8ee103a5eb80da18d Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed, 27 Jan 2021 17:51:59 -0600 Subject: develop clang-format comments (#286) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes --- .clang-format | 16 ++++++++++++++++ test/fheap.c | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index 5b7d76f..979e0c5 100644 --- a/.clang-format +++ b/.clang-format @@ -3,7 +3,10 @@ Language: Cpp BasedOnStyle: LLVM AlignConsecutiveMacros: true AlignConsecutiveAssignments: true +#llvm11: AlignConsecutiveBitFields: false AlignConsecutiveDeclarations: true +#llvm10-11: AlignOperands: true - Align +#llvm11: AllowShortEnumsOnASingleLine: true AlwaysBreakAfterReturnType: AllDefinitions # Can enable the following section when llvm 12.x is out #AttributeMacros: @@ -20,8 +23,11 @@ AlwaysBreakAfterReturnType: AllDefinitions # - H5_ATTR_FALLTHROUGH BraceWrapping: AfterFunction: true + #llvm10-11: AfterControlStatement: false - Never BeforeCatch: true BeforeElse: true + #llvm11: BeforeLambdaBody: false + #llvm11: BeforeWhile: false BreakBeforeBraces: Stroustrup BreakAfterJavaFieldAnnotations: true BreakStringLiterals: true @@ -44,11 +50,15 @@ IncludeCategories: SortPriority: 0 IncludeIsMainRegex: '(public)?$' IndentCaseLabels: true +#llvm11: IndentCaseBlocks: false IndentGotoLabels: false +#llvm11: IndentExternBlock: AfterExternBlock IndentWidth: 4 +#llvm11: InsertTrailingCommas: None MacroBlockBegin: "^BEGIN_FUNC" MacroBlockEnd: "^END_FUNC" ObjCBlockIndentWidth: 4 +#llvm11: ObjCBreakBeforeNestedBlockParam: true ReflowComments: true SortIncludes: false StatementMacros: @@ -74,5 +84,11 @@ StatementMacros: - H5_GCC_DIAG_OFF - H5_GCC_DIAG_ON - CATCH +#llvm10: TypenameMacros: +#llvm10: - STACK_OF +#llvm10: - LIST +#llvm11: WhitespaceSensitiveMacros: +#llvm11: - STRINGIZE +#llvm11: - PP_STRINGIZE ... diff --git a/test/fheap.c b/test/fheap.c index b0b2233..b167012 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -9423,9 +9423,9 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */ + /* first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ -- cgit v0.12