github / github/codeql

C++ false positive: return statement requested after a call to a [[noreturn]] function

Open
#3,327 1 comment 0 reactions 1 assignee Claimed by @dbartol View on GitHub
C++ false-positive good first issue
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

### Synopsis

See references below for code.

The macro `ASTERIA_THROW()` [2] expands to a call to `::rocket::sprintf_and_throw<::std::runtime_error>()` [3], which is marked `[[noreturn]]`, so the enclosing function cannot return from this path; a `return` statement is unnecessary.

### References

1. Original alert:
2. `ASTERIA_THROW`:
3. `::rocket::sprintf_and_throw<::std::runtime_error>`:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.