WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
274484
REGRESSION(
279061@main
): [clang 18] error: 'suppress' attribute only applies to variables and statements
https://bugs.webkit.org/show_bug.cgi?id=274484
Summary
REGRESSION(279061@main): [clang 18] error: 'suppress' attribute only applies ...
Fujii Hironori
Reported
2024-05-21 14:13:44 PDT
After
279061@main
(
bug#274434
), Windows port can't compile. C:\PROGRA~1\LLVM\bin\clang-cl.exe /nologo -TP [...] -c -- C:\ews\work\build\Source\WTF\wtf\BloomFilter.cpp In file included from C:\ews\work\build\Source\WTF\wtf\BloomFilter.cpp:27: In file included from C:\ews\work\build\Source\WTF\wtf/BloomFilter.h:29: In file included from C:\ews\work\build\Source\WTF\wtf/text/AtomString.h:24: In file included from C:\ews\work\build\Source\WTF\wtf/text/AtomStringImpl.h:23: C:\ews\work\build\Source\WTF\wtf/text/UniquedStringImpl.h(34,7): error: 'suppress' attribute only applies to variables and statements 34 | class SUPPRESS_REFCOUNTED_WITHOUT_VIRTUAL_DESTRUCTOR UniquedStringImpl : public StringImpl { | ^ C:\ews\work\build\Source\WTF\wtf/Compiler.h(512,5): note: expanded from macro 'SUPPRESS_REFCOUNTED_WITHOUT_VIRTUAL_DESTRUCTOR' 512 | IGNORE_CLANG_STATIC_ANALYZER_WARNINGS_ATTRIBUTE("webkit.RefCntblBaseVirtualDtor") | ^ C:\ews\work\build\Source\WTF\wtf/Compiler.h(470,73): note: expanded from macro 'IGNORE_CLANG_STATIC_ANALYZER_WARNINGS_ATTRIBUTE' 470 | #define IGNORE_CLANG_STATIC_ANALYZER_WARNINGS_ATTRIBUTE(warning, ...) [[clang::suppress]] | ^ In file included from C:\ews\work\build\Source\WTF\wtf\BloomFilter.cpp:27: In file included from C:\ews\work\build\Source\WTF\wtf/BloomFilter.h:29: In file included from C:\ews\work\build\Source\WTF\wtf/text/AtomString.h:24: C:\ews\work\build\Source\WTF\wtf/text/AtomStringImpl.h(29,7): error: 'suppress' attribute only applies to variables and statements 29 | class SUPPRESS_REFCOUNTED_WITHOUT_VIRTUAL_DESTRUCTOR AtomStringImpl final : public UniquedStringImpl { | ^
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2024-05-21 14:16:58 PDT
Surprisingly, WinCairo EWS and post-commit buildbot don't complain. compiler version? I'm using clang-cl version 18.1.4.
Ryosuke Niwa
Comment 2
2024-05-21 14:41:11 PDT
Sounds like we need to disable this static analyzer feature on Windows then.
Fujii Hironori
Comment 3
2024-05-21 14:54:18 PDT
I think this can happen on Linux. This seems to be a problem for clang 18.0.1.
https://godbolt.org/z/6fcKfWh7d
clang 17.0.1
> <source>:1:9: warning: unknown attribute 'suppress' ignored [-Wunknown-attributes]
clang 18.0.1
> <source>:1:9: error: 'suppress' attribute only applies to variables and statements
Fujii Hironori
Comment 4
2024-05-21 15:13:45 PDT
I took the example code from clang 19 document. clang 18 document doen't have the code. It seems to be a clang 19 feature.
https://clang.llvm.org/docs/AttributeReference.html#suppress
https://web.archive.org/web/20231127125017/https://clang.llvm.org/docs/AttributeReference.html#suppress
Fujii Hironori
Comment 5
2024-05-21 17:38:43 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28892
EWS
Comment 6
2024-05-21 18:13:21 PDT
Committed
279094@main
(c42264fb3ebd): <
https://commits.webkit.org/279094@main
> Reviewed commits have been landed. Closing PR #28892 and removing active labels.
Radar WebKit Bug Importer
Comment 7
2024-05-21 18:14:15 PDT
<
rdar://problem/128508606
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug