Closed
Bug 1254247
Opened 8 years ago
Closed 8 years ago
MOZ_MUST_USE treats expressions evaluating to lvalue references as MUST_USE
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox48 fixed)
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: tnikkel, Assigned: nika)
References
Details
Attachments
(1 file)
8.26 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Bug 1214037 didn't seem to fix this problem for making DrawResult a must use type. Here is one of many try pushes https://treeherder.mozilla.org/#/jobs?repo=try&revision=d89631512db0 The code DrawResult result = SUCCESS; result &= FunctionReturnDrawResult(); always seems to get flagged as not using the value (in many places). Trivially changing it to DrawResult result = SUCCESS; DrawResult resul2 = FunctionReturnDrawResult(); result = result & result2; makes the error go away. However this code still triggers the error DrawResult result = SUCCESS; result = result & FunctionReturnDrawResult();
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(michael)
Comment 1•8 years ago
|
||
Just chiming in: I too would really like to see this fixed. It let us prevent some important classes of errors that are definitely visible to our users as rendering issues.
Assignee | ||
Comment 2•8 years ago
|
||
Turns out that these expressions contained temporaries, which meant that the expression was wrapped. With this patch those wrappers are now ignored. Sorry for the delay, I'm in my last 3 weeks of class, and have remarkably little time to do this sort of stuff. try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=83f03890f8fd
Attachment #8729701 -
Flags: review?(ehsan)
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(michael)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → michael
Updated•8 years ago
|
Attachment #8729701 -
Flags: review?(ehsan) → review+
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/79af3a479ce9
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Reporter | ||
Comment 5•8 years ago
|
||
Thanks!
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•