Summary: | `FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Conrad Shultz <conrad_shultz> | ||||||||
Component: | Web Template Framework | Assignee: | Conrad Shultz <conrad_shultz> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, commit-queue, conrad_shultz, darin, dbates, ews-watchlist, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Conrad Shultz
2020-01-22 18:29:56 PST
Created attachment 388506 [details]
Patch
Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review > Source/WTF/wtf/Compiler.h:207 > -#if COMPILER(GCC) > +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review >> Source/WTF/wtf/Compiler.h:207 >> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) > > Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. Oh, non-C++, I see Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review >>> Source/WTF/wtf/Compiler.h:207 >>> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) >> >> Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. > > Oh, non-C++, I see Since all the versions of CLANG we compile with have this support, I suggest just writing: #if COMPILE(GCC_COMPATIBLE) (In reply to Darin Adler from comment #7) > Comment on attachment 388506 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388506&action=review > > >>> Source/WTF/wtf/Compiler.h:207 > >>> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) > >> > >> Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. > > > > Oh, non-C++, I see > > Since all the versions of CLANG we compile with have this support, I suggest > just writing: > > #if COMPILE(GCC_COMPATIBLE) In my testing, I found this wasn't always true, so I'd prefer to leave the `__has_attribute` check. Thanks for the review, will sort out what's going on with Windows before landing. Created attachment 389056 [details]
Patch
Created attachment 389274 [details]
Patch
The commit-queue encountered the following flaky tests while processing attachment 389274 [details]: editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org) The commit-queue is continuing to process your patch. Comment on attachment 389274 [details] Patch Clearing flags on attachment: 389274 Committed r255467: <https://trac.webkit.org/changeset/255467> All reviewed patches have been landed. Closing bug. |