Bug 286982
| Summary: | Suppress lambda capture warning in StreamConnectionWorkQueue.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | New Bugs | Assignee: | Diego Pino <dpino> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | dpino, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ryosuke Niwa
Suppress the lambda capture static analyzer warning in StreamConnectionWorkQueue.cpp.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
Pull request: https://github.com/WebKit/WebKit/pull/39957
EWS
Committed 289774@main (a4b28dc46934): <https://commits.webkit.org/289774@main>
Reviewed commits have been landed. Closing PR #39957 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/144143542>
Diego Pino
Compilation with Clang-18 and lower is failing after this commit:
https://build.webkit.org/#/builders/628/builds/19509
```
FAILED: Source/WTF/wtf/CMakeFiles/WTF.dir/MainThread.cpp.o
/usr/bin/ccache /usr/lib/sdk/llvm18/bin/clang++ -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WPE__=1 -DBUILDING_WTF -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WPE\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DPAS_BMALLOC=1 -DSTATICALLY_LINKED_WITH_bmalloc -I/app/webkit/WebKitBuild/WPE/Release -I/app/webkit/WebKitBuild/WPE/Release/WTF/DerivedSources -I/app/webkit/Source/WTF -I/app/webkit/Source/WTF/wtf -I/app/webkit/Source/WTF/wtf/dtoa -I/app/webkit/Source/WTF/wtf/fast_float -I/app/webkit/Source/WTF/wtf/persistence -I/app/webkit/Source/WTF/wtf/simdutf -I/app/webkit/Source/WTF/wtf/text -I/app/webkit/Source/WTF/wtf/text/icu -I/app/webkit/Source/WTF/wtf/threads -I/app/webkit/Source/WTF/wtf/unicode -I/app/webkit/WebKitBuild/WPE/Release/bmalloc/Headers -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/sysprof-6 -fdiagnostics-color=always -fcolor-diagnostics -Wextra -Wall -Werror=undefined-internal -Werror=undefined-inline -pipe -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-parentheses-equality -Qunused-arguments -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -fasynchronous-unwind-tables -fdebug-types-section -fno-strict-aliasing -fno-exceptions -fno-rtti -fcoroutines -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++23 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wunsafe-buffer-usage -fsafe-buffer-usage-suggestions -pthread -MD -MT Source/WTF/wtf/CMakeFiles/WTF.dir/MainThread.cpp.o -MF Source/WTF/wtf/CMakeFiles/WTF.dir/MainThread.cpp.o.d -o Source/WTF/wtf/CMakeFiles/WTF.dir/MainThread.cpp.o -c /app/webkit/Source/WTF/wtf/MainThread.cpp
In file included from /app/webkit/Source/WTF/wtf/MainThread.cpp:37:
/app/webkit/Source/WTF/wtf/RunLoop.h:188:58: error: 'suppress' attribute only applies to variables and statements
188 | : Timer(WTFMove(runLoop), [object, function] SUPPRESS_UNCOUNTED_LAMBDA_CAPTURE { // The Timer's owner is expected to cancel the Timer in its destructor.
| ^
```
It's a compiler error. Clang-18 doesn't support 'suppress' attribute on lambdas.
https://godbolt.org/z/M8oE6hh5s
Ryosuke Niwa
You probably need to disable these macros in your version of clang.
Diego Pino
Re-opening for pull request https://github.com/WebKit/WebKit/pull/40199
EWS
Committed 289996@main (d01b88858f3b): <https://commits.webkit.org/289996@main>
Reviewed commits have been landed. Closing PR #40199 and removing active labels.