Преглед изворни кода

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.
Idan Horowitz пре 3 година
родитељ
комит
4dbda2d5b4
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      .clang-tidy

+ 2 - 0
.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