Don't apply lvalue-to-rvalue conversion in DefaultLValueConversion to
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 14 Apr 2020 02:07:16 +0000 (19:07 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 14 May 2020 03:12:10 +0000 (20:12 -0700)
commit50a81ea2bce3aec01ae6fae1505e57ec7aa36ac7
tree9c4bfaecfc3e7d1f06e88838698920d3aee0c759
parent1c1fb350c59a9c79078959b2fa15e6d658934a56
Don't apply lvalue-to-rvalue conversion in DefaultLValueConversion to
the expression that is passed to it if it has a function type or array
type

lvalue-to-rvalue conversion should only be applied to non-function,
non-array types, but clang was applying the conversion to discarded
value expressions of array types.

rdar://problem/61203170

Differential Revision: https://reviews.llvm.org/D78134
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaStmt.cpp
clang/test/CXX/expr/p10-0x.cpp
clang/test/SemaCXX/warn-unused-value-cxx11.cpp