[Webkit-unassigned] [Bug 220002] New: Define _LIBCPP_ENABLE_NODISCARD when building WebKit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 17 19:22:02 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=220002
Bug ID: 220002
Summary: Define _LIBCPP_ENABLE_NODISCARD when building WebKit
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
Define _LIBCPP_ENABLE_NODISCARD when building WebKit.
This will catch errors where a developer means to declare a variable (like a resource acquisition is initialization (RAII) object), but forgets to give it a variable name:
SpmeRAIIObject { };
This instantiates the object then destroys it in a single statement because the object's scope is the statement itself.
The developer probably meant to give a variable like this instead:
SpmeRAIIObject object { };
Note that I tried compiling a Release build of WebKit for macOS with this enabled, but I didn't find any issues.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201218/aa894fcb/attachment.htm>
More information about the webkit-unassigned
mailing list