diff options
author | Jorge Pinto Sousa <jorge.pinto.sousa@proton.me> | 2023-04-21 07:45:05 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2023-04-21 07:45:05 -0400 |
commit | 7c0021923503a9a5fe1ba1f0b778b5b83c42aa43 (patch) | |
tree | 90568bbb54b37bb932a99f6bdc51adcc478254c3 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp | |
parent | 5368c1065f0eaefc442247134ba3b2e98c97fda7 (diff) | |
download | llvm-7c0021923503a9a5fe1ba1f0b778b5b83c42aa43.zip llvm-7c0021923503a9a5fe1ba1f0b778b5b83c42aa43.tar.gz llvm-7c0021923503a9a5fe1ba1f0b778b5b83c42aa43.tar.bz2 |
[clang] trigger -Wcast-qual on functional casts
-Wcast-qual does not trigger on the following code in Clang, but does
in GCC.
const auto i = 42;
using T = int*;
auto p = T(&i);
The expected behavior is that a functional cast should trigger
the warning the same as the equivalent C cast because
the meaning is the same, and nothing about the functional cast
makes it easier to recognize that a const_cast is occurring.
Fixes https://github.com/llvm/llvm-project/issues/62083
Differential Revision: https://reviews.llvm.org/D148276
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions