Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 #62083 Differential Revision: https://reviews.llvm.org/D148276
- Loading branch information
1 parent
5368c10
commit 7c00219
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters