Skip to content

[clang-tidy] add option to treat all unannotated functions as throwing in bugprone-exception-escape #164795

@firewave

Description

@firewave

Currently the bugprone-exception-escape check only reports findings when it actually sees an exception being thrown (hence some warnings only appearing with libc++ - see #152026 and #109587).

Adding an option which treats all functions not flagged as non-throwing as potentially throwing would mitigate that. That option could be made more granular as to differentiate between functions with known and unknown implementations.

An additional tunable along FunctionsThatWillNotThrow could also be added for helping with known non-throwing functions which are not annotated as such (as in legacy APIs).

It is possible that this needs to be spun into its own check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions