[all-commits] [llvm/llvm-project] 2fbd13: [Sema] Make C++ functional-style cast warn about d...
chbessonova via All-commits
all-commits at lists.llvm.org
Tue Sep 5 04:37:16 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2fbd1323e7bf6ec204867774db8aa9b7dc976da5
https://github.com/llvm/llvm-project/commit/2fbd1323e7bf6ec204867774db8aa9b7dc976da5
Author: Kristina Bessonova <kbessonova at accesssoftek.com>
Date: 2023-09-05 (Tue, 05 Sep 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaCast.cpp
M clang/test/Sema/warn-cast-qual.c
Log Message:
-----------
[Sema] Make C++ functional-style cast warn about dropped qualifiers (-Wcast-qual)
Functional-style cast (i.e. a simple-type-specifier or typename-specifier
followed by a parenthesize single expression [expr.type.conv]) is equivalent
to the C-style cast, so that makes sense they have identical behavior
including warnings.
This also matches GCC https://godbolt.org/z/b8Ma9Thjb.
Reviewed By: rnk, aaron.ballman
Differential Revision: https://reviews.llvm.org/D159133
More information about the All-commits
mailing list