.clang-tidy: enable cppcoreguidelines-avoid-const-or-ref-data-members
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Mar 2024 20:11:33 +0000 (16:11 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 Mar 2024 01:30:14 +0000 (21:30 -0400)
Enable:

  https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.html

Set the `AllowMissingMoveFunctionsWhenCopyIsDeleted`, so it's less
verbose when you just want to delete everything.

Set `AllowSoleDefaultDtor`, because we have legitimate cases (when
defining virtual base classes) where we only define a default
destructor.  Perhaps there's a pitfall I don't see when allowing this?

Change-Id: I4a8d20c0be628ac807db4c6b52548e3b7d7ee286
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12090
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
.clang-tidy

index 6a8a29ba48c8dbd7493b32dd6954c7afca84e05e..acbb1421c55ea6c46f74ba1033ed57d869e94692 100644 (file)
@@ -55,6 +55,7 @@ Checks:          '-*,
                   bugprone-virtual-near-miss,
                   bugprone-unused-raii,
                   bugprone-use-after-move,
+                  cppcoreguidelines-avoid-const-or-ref-data-members,
                   cppcoreguidelines-pro-type-const-cast,
                   cppcoreguidelines-slicing,
                   cppcoreguidelines-special-member-functions,
@@ -96,3 +97,7 @@ FormatStyle: 'file'
 CheckOptions:
   - key:          bugprone-assert-side-effect.AssertMacros
     value:        BT_ASSERT,BT_ASSERT_DBG
+  - key:          cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
+    value:        true
+  - key:          cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
+    value:        true
This page took 0.024744 seconds and 4 git commands to generate.