Closed Bug 1114267 Opened 5 years ago Closed 5 years ago

Enforce that MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS classes can only have trivial ctors and dtors

Categories

(Firefox Build System :: Source Code Analysis, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(2 files)

No description provided.
Assignee: nobody → ehsan.akhgari
Depends on: 773014
Attachment #8539749 - Flags: review?(jmuizelaar)
Comment on attachment 8539749 [details] [diff] [review]
Part 1: Add an analysis to force some classes to have trivial ctors and dtors

Review of attachment 8539749 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/clang-plugin/tests/TestTrivialCtorDtor.cpp
@@ +9,5 @@
> +  BadUserDefinedCtor() {}
> +};
> +
> +struct MOZ_TRIVIAL_CTOR_DTOR BadUserDefinedDtor { // expected-error {{class 'BadUserDefinedDtor' must have trivial constructors and destructors}}
> +  BadUserDefinedDtor() {}

~BadUserDefinedDtor
Attachment #8539749 - Flags: review?(jmuizelaar) → review+
Attachment #8539751 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/6992f8b890ff
https://hg.mozilla.org/mozilla-central/rev/682c3ff54fae
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.