clang incorrectly accepts constexpr array indexing of null pointer
Open
clang:frontend
confirmed
constexpr
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Consider the following in C++:
```c++
constexpr int *x = &((int*)nullptr)[0];
```
This is dereferencing a null pointer, I think, but there is no "dereferencing a null pointer" diagnostic like we'd get with "*".
Contributor guide
Assessment
This issue has not been assessed yet.