[PATCH] D125919: Drop qualifiers from return types in C (DR423)
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 18 12:34:42 PDT 2022
aaron.ballman created this revision.
aaron.ballman added reviewers: erichkeane, tahonermann, jyknight, efriedma, clang-language-wg.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.
WG14 DR423 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_423), resolved during the C11 time frame, changed the way qualifiers are handled on function return types and in cast expressions after it was noted that these types are now directly observable via generic selection expressions. In C, the function declarator is adjusted to ignore all qualifiers (including `_Atomic` qualifiers).
Clang already handles the cast expression case correctly (by performing the lvalue conversion, which drops the qualifiers as well), but with these changes it will now also handle function declarations appropriately.
Fixes #39595
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125919
Files:
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaType.cpp
clang/test/Sema/block-call.c
clang/test/Sema/c89.c
clang/test/Sema/function.c
clang/test/Sema/warn-missing-prototypes.c
clang/test/Sema/wg14-dr423.c
clang/test/SemaObjC/block-omitted-return-type.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125919.430477.patch
Type: text/x-patch
Size: 8431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220518/e52a4a26/attachment.bin>
More information about the cfe-commits
mailing list