[Sema] Resolve placeholder types before type deduction to silence
authorAkira Hatanaka <ahatanaka@apple.com>
Mon, 8 Jul 2019 20:04:39 +0000 (20:04 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 8 Jul 2019 20:04:39 +0000 (20:04 +0000)
commit8b1becf2e31d9170ee356a19c7b6ea991d3a520f
treea9c76d8550fb47fedb89c9c523d92ecc7806d811
parentc9fa99d066f0f615538e106880fdb9fb48f8e55b
[Sema] Resolve placeholder types before type deduction to silence
spurious `-Warc-repeated-use-of-weak` warnings

The spurious -Warc-repeated-use-of-weak warnings are issued when an
initializer expression uses a weak ObjC pointer.

My first attempt to silence the warnings (r350917) caused clang to
reject code that is legal in C++17. The patch is based on the feedback I
received from Richard when the patch was reverted.

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190422/268945.html
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190422/268943.html

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

llvm-svn: 365382
clang/include/clang/AST/Expr.h
clang/include/clang/Basic/Attr.td
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaObjC/arc-repeated-weak.mm