Closed
Bug 1209227
Opened 9 years ago
Closed 9 years ago
Apply MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS to mozilla::Variant
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: jld, Assigned: nika)
References
Details
Attachments
(2 files, 1 obsolete file)
862 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
6.63 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
mozilla::Variant uses mozilla::AlignedStorage with the largest size of the possible types, rather than a union of AlignedStorage2 like the IPDL compiler currently does (also, mozilla::Maybe), so it won't inherit static analysis annotations. It ought to Just Work to apply MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS to the class, but this should be tested.
Assignee | ||
Comment 1•9 years ago
|
||
MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS should work with variable arg counts, but it would still be good to check, because I'm not sure how clang interacts with `typename... Ts`, There's a chance that that entire block of substitutions appears as a single item in the AST or something.
It would be super awesome if we could add a test for stuff like that to TestInheritTypeAnnotationsFromTemplateArgs.cpp, so that it doesn't get broken in the future.
Assignee | ||
Comment 2•9 years ago
|
||
I've done some testing - and MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS doesn't play well with pack expansions. I'll have to modify the clang plugin to take them into account before we can do this.
Assignee: nobody → michael
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8667405 -
Flags: review?(ehsan)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8667406 -
Flags: review?(nfroyd)
![]() |
||
Updated•9 years ago
|
Attachment #8667406 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 5•9 years ago
|
||
I'm avoiding using std::function under the assumption that that is what the linux failure was compalaining about.
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=979617bb3e97
Attachment #8667405 -
Attachment is obsolete: true
Attachment #8667405 -
Flags: review?(ehsan)
Attachment #8667949 -
Flags: review?(ehsan)
Updated•9 years ago
|
Attachment #8667949 -
Flags: review?(ehsan) → review+
Comment 7•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ed89ff77c920
https://hg.mozilla.org/mozilla-central/rev/e12e09384b27
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•