Rewording note note_constexpr_invalid_cast
authorMuhammad Usman Shahid <codesbyusman@gmail.com>
Mon, 12 Sep 2022 11:47:18 +0000 (07:47 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 12 Sep 2022 11:47:39 +0000 (07:47 -0400)
commitea26ed1f9c37465e0123c3357e459dd819c7d402
treed41ece068140e80349fb674b81a2139f099b0531
parent8a15695be2395af1c7cc157865c5c09292009901
Rewording note note_constexpr_invalid_cast

The diagnostics here are correct, but the note is really silly. It
talks about reinterpret_cast in C code. So rewording it for c mode by
using another %select{}.
```
int array[(long)(char *)0];
```
previous note:
```
cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
```
reworded note:
```
this conversion is not allowed in a constant expression
```

Differential Revision: https://reviews.llvm.org/D133194
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/lib/AST/ExprConstant.cpp
clang/test/Sema/cast.c
clang/test/SemaCXX/constant-expression-cxx11.cpp