Skip to content

Warn if compartment call returns void #34

@rmn30

Description

@rmn30

It would be good if clang would warn if the return type of a compartment call is void. Compartment calls can fail unexpectedly and return -1 (e.g. due to trusted stack exhaustion). Callers should be aware of and check for this, therefore it is never appropriate for a compartment call to return void. For the same reason we should also consider automatically adding the nodiscard attribute to compartment calls.

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