llvm / llvm/llvm-project

-Wreturn-stack-address false positive with unreachable code

Open
#166,374 0 comments 0 reactions 0 assignees View on GitHub
clang:diagnostics false-positive
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://cpp.godbolt.org/z/3357xPfP8

```cpp
#include

template
[[noreturn]] constexpr R __absurd() { std::abort(); }

int const& weird() {
return __absurd();
}
```

Technically, `weird` should return `__absurd()`, but I accidentally wrote it like this and I'm not really sure if this counts as a bug.

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.