]> granicus.if.org Git - clang/commit
N3922: direct-list-initialization of an auto-typed variable no longer deduces a
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 11 Nov 2015 01:36:17 +0000 (01:36 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 11 Nov 2015 01:36:17 +0000 (01:36 +0000)
commit1fd6dc6f12ff18f8bea43c1cefe0957b95d7888a
tree8eb2e5f377c295c5f81d204c2a287dee9a031e80
parentb59606171d93d85f64406b7e7d31996d381a5f14
N3922: direct-list-initialization of an auto-typed variable no longer deduces a
std::initializer_list<T> type. Instead, the list must contain a single element
and the type is deduced from that.

In Clang 3.7, we warned by default on all the cases that would change meaning
due to this change. In Clang 3.8, we will support only the new rules -- per
the request in N3922, this change is applied as a Defect Report against earlier
versions of the C++ standard.

This change is not entirely trivial, because for lambda init-captures we
previously did not track the difference between direct-list-initialization and
copy-list-initialization. The difference was not previously observable, because
the two forms of initialization always did the same thing (the elements of the
initializer list were always copy-initialized regardless of the initialization
style used for the init-capture).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252688 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/clang/AST/Expr.h
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/DeclSpec.h
include/clang/Sema/Sema.h
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaLambda.cpp
lib/Sema/TreeTransform.h
test/CXX/drs/dr13xx.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp
test/Parser/cxx0x-lambda-expressions.cpp
test/Parser/objcxx0x-lambda-expressions.mm
test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
test/SemaCXX/cxx1y-init-captures.cpp
www/cxx_status.html