[all-commits] [llvm/llvm-project] ea26ed: Rewording note note_constexpr_invalid_cast
Muhammad Usman Shahid via All-commits
all-commits at lists.llvm.org
Mon Sep 12 04:47:59 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ea26ed1f9c37465e0123c3357e459dd819c7d402
https://github.com/llvm/llvm-project/commit/ea26ed1f9c37465e0123c3357e459dd819c7d402
Author: Muhammad Usman Shahid <codesbyusman at gmail.com>
Date: 2022-09-12 (Mon, 12 Sep 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticASTKinds.td
M clang/lib/AST/ExprConstant.cpp
M clang/test/Sema/cast.c
M clang/test/SemaCXX/constant-expression-cxx11.cpp
Log Message:
-----------
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
More information about the All-commits
mailing list