aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2017-09-19 13:10:30 +0000
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2017-09-19 13:10:30 +0000
commit9cf0e12a80abe4ab7050e8134d34935096720999 (patch)
tree9917333377f4bd6e6357caeb93e61cb178422e99 /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent28887fe54842fbfbb89b8789280c6a0f3d43ef31 (diff)
downloadllvm-9cf0e12a80abe4ab7050e8134d34935096720999.zip
llvm-9cf0e12a80abe4ab7050e8134d34935096720999.tar.gz
llvm-9cf0e12a80abe4ab7050e8134d34935096720999.tar.bz2
[Sema] Disallow assigning record lvalues with nested const-qualified fields.
Summary: According to C99 6.3.2.1p1, 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 these lvalues. 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 . Committing on behalf of bevinh (Bevin Hansson). Reviewers: rtrieu, rsmith, bjope Reviewed By: bjope Subscribers: Ka-Ka, rogfer01, bjope, fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D37254 llvm-svn: 313628
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions