[PATCH] D37254: [Sema] Disallow assigning record lvalues with nested const-qualified fields.
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 01:40:50 PDT 2017
bevinh created this revision.
According to C99 126.96.36.199p1, structs and unions with nested
const-qualified fields (that is, const-qualified fields
declared at some recursive level of the aggregate) are not
modifiable lvalues. However, Clang permits assignments of
With this patch, we both prohibit the assignment of records
with const-qualified fields and emit a best-effort diagnostic.
This fixes https://bugs.llvm.org/show_bug.cgi?id=31796 .
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10176 bytes
Desc: not available
More information about the cfe-commits