[PATCH] D148730: [C11] Allow initialization of an atomic-qualified pointer from a null pointer constant
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 19 10:47:16 PDT 2023
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, clang-language-wg.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.
The relevant language rule from C11 is 6.5.16.1p1: "the left operand is an atomic, qualified, or unqualified pointer, and the right is a null pointer constant; or". We correctly handled qualified or unqualified pointer types, but failed to handle atomic-qualified pointer types. Now we look through the atomic qualification before testing the constraint requirements.
Fixes https://github.com/llvm/llvm-project/issues/49563
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148730
Files:
clang/docs/ReleaseNotes.rst
clang/lib/AST/Expr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/Sema/atomic-expr.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148730.515018.patch
Type: text/x-patch
Size: 9782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230419/1ac5a7e3/attachment.bin>
More information about the cfe-commits
mailing list