[webkit-changes] [WebKit/WebKit] f1fd55: "Function could be declared with attribute 'noretu...

aestes noreply at github.com
Wed Jan 31 17:50:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f1fd5543da45033aad082598fca3290af392b7e7
      https://github.com/WebKit/WebKit/commit/f1fd5543da45033aad082598fca3290af392b7e7
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M Source/WebKit/Scripts/generate-serializers.py

  Log Message:
  -----------
  "Function could be declared with attribute 'noreturn'" warnings generated in some configurations when building GeneratedSerializers.mm
https://bugs.webkit.org/show_bug.cgi?id=268501
rdar://122043321

Reviewed by Elliott Williams.

In configurations where -Wmissing-noreturn is enabled, a warning (promoted to error in engineering
builds) in GeneratedSerializers.mm is emitted when an instance of ArgumentCoder::encode is
generated where each subclass is guarded by a condition that evaluates to false in that particular
build configuration. In that case the only code in the function is an ASSERT_NOT_REACHED(), which
indeed is a case where [[noreturn]] could be used.

Resolved this by ignoring -Wmissing-noreturn when generating ArgumentCoder::encode functions with
subclass members.

* Source/WebKit/Scripts/generate-serializers.py:
(generate_one_impl):

Canonical link: https://commits.webkit.org/273874@main




More information about the webkit-changes mailing list