Revert r350917 "[Sema] If CheckPlaceholderExpr rewrites the initializer
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Apr 2019 02:22:38 +0000 (02:22 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Apr 2019 02:22:38 +0000 (02:22 +0000)
commit42a22370f2b7d83b9041498831fce804c1659628
tree350a23afd6f4282c2dc889a6b6c39de90d1a3ec5
parent27fd2f60eef0f8b57d9b228385c1ecaad6b21d20
Revert r350917 "[Sema] If CheckPlaceholderExpr rewrites the initializer
of an auto"

This commit changed the initializer expression passed into
initialization (stripping off an enclosing pair of parentheses or
braces) and subtly changing the meaning of programs, typically by
inserting bogus calls to copy constructors.

See the added testcase in test/SemaCXX/cxx1y-init-captures.cpp for an
example of the breakage.

llvm-svn: 359066
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaLambda.cpp
clang/test/SemaCXX/cxx1y-init-captures.cpp
clang/test/SemaObjC/arc-repeated-weak.mm