Skip to content

false positive of [[clang::require_field_initialization]] #126490

@hokein

Description

@hokein

https://godbolt.org/z/eaG1e7ojY

struct Foo {
  int x;
  int y [[clang::require_explicit_initialization]];
};

struct Bar {
  Bar(Foo foo) : foo_(foo) {} // Field in 'Foo' requires explicit initialization but is not explicitly initialized

  Foo foo_;
};

This is caused by the 20fd7df

cc @higher-performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions