Skip to content

Deferred diagnostics are broken for In-class initializers #1032

Open
@Fznamznon

Description

@Fznamznon

The following test case cannot be diagnosed with deferred diagnostics system:

int foo() { throw 1; }
struct S {
    int bar = foo();
};
SYCL_EXTERNAL void bar() { S s; }

We do our reporting at a functiondecl->caller level, when the declcontext can actually be a CXXRecordDecl as well.
NOTE: This seems broken not only for SYCL, but for any other programming model which allows in-class initializes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions