Skip to content

Building with clang 20 causes lifetimebound on void functions to error. #150

@bivsk

Description

@bivsk

Clang 20 outputs an error when [[lifetimebound]] attribute is applied on a function returning void. I'm not sure how best to handle this here.

/var/tmp/portage/media-libs/tg_owt-0_pre20241202/work/tg_owt-be39b8c8d0db1f377118f813f0c4bd331d341d5e/src/api/candidate.h:108:40: error: 'lifetimebound' attribute cannot be applied to a parameter of a function that returns void; did you mean 'lifetime_capture_by(X)'
  108 |   void set_type(absl::string_view type ABSL_ATTRIBUTE_LIFETIME_BOUND) {
      |                                        ^
/usr/include/absl/base/attributes.h:821:41: note: expanded from macro 'ABSL_ATTRIBUTE_LIFETIME_BOUND'
  821 | #define ABSL_ATTRIBUTE_LIFETIME_BOUND [[clang::lifetimebound]]
      |                                         ^
1 error generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions