Closed
Bug 1473217
(clang-tidy-unused-raii)
Opened 7 years ago
Closed 6 years ago
Fix and enable clang-tidy's misc-unused-raii warnings
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
clang-tidy's misc-unused-raii check finds temporary objects that look like RAII objects:
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html
The canonical example for this is a scoped lock object missing a name:
{
scoped_lock(&global_mutex);
critical_section();
}
The destructor of the scoped_lock is called before the critical_section is entered, leaving it unprotected.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 5•7 years ago
|
||
thank you for the patch, let's make sure we don't regress: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d00ee276ad624a0b06741afa6ad3485a3e288d8
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8989833 [details]
Bug 1473217 - Part 3: Enable clang-tidy's misc-unused-raii warnings.
https://reviewboard.mozilla.org/r/254794/#review261758
Attachment #8989833 -
Flags: review?(bpostelnicu) → review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8989832 [details]
Bug 1473217 - Part 2: dom: Fix clang-tidy's misc-unused-raii warnings.
https://reviewboard.mozilla.org/r/254792/#review262776
Attachment #8989832 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 8•7 years ago
|
||
I will land patches 2 and 3 while waiting for patch 1 review.
Keywords: leave-open
Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bfb8b44ccc42
Part 2: dom: Fix misc-unused-raii warnings. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb66954c173f
Part 3: clang-tidy: Enable misc-unused-raii check. r=andi
Comment 10•7 years ago
|
||
bugherder |
Comment 11•6 years ago
|
||
Comment on attachment 8989831 [details]
Bug 1473217 - Part 1: webspeech: Fix clang-tidy's misc-unused-raii warning.
Sorry, missed that. Obvious fix
Attachment #8989831 -
Flags: review?(rjesup) → review+
Comment 12•6 years ago
|
||
Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/67f6872c7302
webspeech: Fix clang-tidy's misc-unused-raii warning. r=jesup
Assignee | ||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•