]> granicus.if.org Git - clang/commit
P0620 follow-up: deducing `auto` from braced-init-list in new expr
authorZhihao Yuan <zy@miator.net>
Mon, 11 Dec 2017 18:29:54 +0000 (18:29 +0000)
committerZhihao Yuan <zy@miator.net>
Mon, 11 Dec 2017 18:29:54 +0000 (18:29 +0000)
commite14d055b29b583feead78d2dbf704a67ed4000ec
tree4466cd48dc8beb22e9e70d75814549584660e090
parentd2dd52d1df034f6060a06604d2be1743285cfcae
P0620 follow-up: deducing `auto` from braced-init-list in new expr

Summary:
This is a side-effect brought in by p0620r0, which allows other placeholder types (derived from `auto` and `decltype(auto)`) to be usable in a `new` expression with a single-clause //braced-init-list// as its initializer (8.3.4 [expr.new]/2).  N3922 defined its semantics.

References:
 http://wg21.link/p0620r0
 http://wg21.link/n3922

Reviewers: rsmith, aaron.ballman

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D39451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320401 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExprCXX.cpp
test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp
test/CXX/expr/expr.unary/expr.new/p2-cxx14.cpp [new file with mode: 0644]
test/CXX/expr/expr.unary/expr.new/p2-cxx1z.cpp [new file with mode: 0644]
test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp