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
267973
Add -Wno-elaborated-enum-base to WARNING_FLAGS when building with clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=267973
Summary
Add -Wno-elaborated-enum-base to WARNING_FLAGS when building with clang stati...
David Kilzer (:ddkilzer)
Reported
2024-01-23 17:18:32 PST
Add -Wno-elaborated-enum-base to WARNING_FLAGS when building with clang static analyzer. The clang static analyzer from open source clang-17 complains about how the `CF_ENUM()` macro is defined in `CFAvailability.h`, so we have to disable this warning for now. The internal fix to `CFAvailability.h` is tracked by <
rdar://121475724
>. Example: In file included from OpenSource/Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:27: In file included from WebKitBuild/Debug/usr/local/include/wtf/text/TextBreakIterator.h:32: In file included from WebKitBuild/Debug/usr/local/include/wtf/text/cf/TextBreakIteratorCF.h:23: In file included from WebKitBuild/Debug/usr/local/include/wtf/text/cf/TextBreakIteratorCFCharacterCluster.h:24: WebKitBuild/Debug/usr/local/include/wtf/spi/cf/CFStringSPI.h:39:9: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base] 39 | typedef CF_ENUM(CFIndex, CFStringCharacterClusterType) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from OpenSource/Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:25: In file included from OpenSource/Source/WTF/wtf/RetainPtr.h:33: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:54: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:21: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:178:55: note: expanded from macro 'CF_ENUM' 178 | #define CF_ENUM(...) __CF_ENUM_GET_MACRO(__VA_ARGS__, __CF_NAMED_ENUM, __CF_ANON_ENUM, )(__VA_ARGS__) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:143:48: note: expanded from macro '__CF_ENUM_GET_MACRO' 143 | #define __CF_ENUM_GET_MACRO(_1, _2, NAME, ...) NAME | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:151:75: note: expanded from macro '__CF_NAMED_ENUM' 151 | #define __CF_NAMED_ENUM(_type, _name) enum __CF_ENUM_ATTRIBUTES _name : _type _name; enum _name : _type | ^~~~~~~ 1 error generated.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-01-23 17:19:00 PST
<
rdar://problem/121479931
>
David Kilzer (:ddkilzer)
Comment 2
2024-01-23 17:45:45 PST
Pull request:
https://github.com/WebKit/WebKit/pull/23142
EWS
Comment 3
2024-01-24 11:45:24 PST
Committed
273435@main
(a4903bd869a6): <
https://commits.webkit.org/273435@main
> Reviewed commits have been landed. Closing PR #23142 and removing active labels.
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