Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4b535ee9b46f7a36862c7511dd164180bc98d8d3
https://github.com/WebKit/WebKit/commit/4b535ee9b46f7a36862c7511dd164180bc98d8d3
Author: Fady Farag <[email protected]>
Date: 2026-02-01 (Sun, 01 Feb 2026)
Changed paths:
M Source/WTF/wtf/Vector.h
Log Message:
-----------
Add C++17 [[nodiscard]] to WTF::Vector accessor functions
https://bugs.webkit.org/show_bug.cgi?id=306733
rdar://169398241
Reviewed by Sam Weinig.
libc++ marks std::vector's accessor functions as [[nodiscard]].
Apply the same to WTF::Vector to warn against discarding return values.
LLVM/libc++ docs:
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant
* Source/WTF/wtf/Vector.h:
(WTF::Vector::size const):
(WTF::Vector::sizeInBytes const):
(WTF::Vector::capacity const):
(WTF::Vector::isEmpty const):
Canonical link: https://commits.webkit.org/306614@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications