Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A15-4-4: Functions that allocate are considered non-throwing #662

Open
gg-sr opened this issue Aug 13, 2024 · 0 comments
Open

A15-4-4: Functions that allocate are considered non-throwing #662

gg-sr opened this issue Aug 13, 2024 · 0 comments
Labels
false positive/false negative An issue related to observed false positives or false negatives.

Comments

@gg-sr
Copy link

gg-sr commented Aug 13, 2024

Affected rules

  • A15-4-4

Description

A15-4-4/MissingNoExcept.ql flags functions which are not noexcept when no exception is explicitly thrown by them (or the functions they call). Unfortunately, this doesn't take into a account the fact that std::bad_alloc can be implicitly thrown by functions which allocate.

Example

void AppendTo(std::string& string) {
  // rules/A15-4-4/MissingNoExcept.bqrs:
  //   Function AppendTo could be declared noexcept(true).
  static_cast<void>(string.append("foo"));
}
@gg-sr gg-sr added the false positive/false negative An issue related to observed false positives or false negatives. label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false positive/false negative An issue related to observed false positives or false negatives.
Projects
None yet
Development

No branches or pull requests

1 participant