From 4dbda2d5b4504e2aac7fb342c083f222f5ddbfcf Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Fri, 10 Dec 2021 19:49:10 +0200 Subject: [PATCH] Meta: Enable the "bugprone-dangling-handle" clang-tidy check This should catch (the trivial cases of) construction of StringViews from temporary Strings and the construction of Spans from temporary Vectors. --- .clang-tidy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 6fa2b16ee00..36db48bc61c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -41,6 +41,8 @@ WarningsAsErrors: '' HeaderFilterRegex: 'AK|Userland|Kernel|Tests' FormatStyle: none CheckOptions: + - key: bugprone-dangling-handle.HandleClasses + value: 'AK::StringView;AK::Span' - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic value: true - key: readability-implicit-bool-conversion.AllowPointerConditions