https://bugs.llvm.org/show_bug.cgi?id=49321
Bug ID: 49321
Summary: forming reference to nullptr is not rejected in
constexpr
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: ldalessan...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
I think this UB should be rejected.
```
constexpr bool foo(int* i) {
int& j = *i;
return true;
}
static_assert(foo(nullptr));
```
https://godbolt.org/z/cKo3jf
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs