Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5f2b2d6

Browse files
johnstiles-googleSkia Commit-Bot
authored andcommitted
Enable ClangTidy guard bugprone-unused-raii.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html ------- Finds temporaries that look like RAII objects. The canonical example for this is a scoped lock. { scoped_lock(&global_mutex); critical_section(); } The destructor of the scoped_lock is called before the critical_section is entered, leaving it unprotected. ------- Change-Id: I40394eb84e7e4ad0564c409ecb52df2ef5af35b6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306838 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
1 parent f6b3ab2 commit 5f2b2d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Checks: '-*,bugprone-use-after-move,bugprone-undelegated-constructor,google-build-namespaces'
1+
Checks: '-*,bugprone-use-after-move,bugprone-unused-raii,bugprone-undelegated-constructor,google-build-namespaces'

0 commit comments

Comments
 (0)