HomePhabricator

[Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling…

Authored by erik.pilkington on Sep 3 2020, 9:41 AM.

Description

[Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

Previously, this code discarded the result of CheckPlaceholderExpr for
non-matrix subexpressions. Not only is this wasteful, but it was creating a
Warc-repeated-use-of-weak false-positive on the attached testcase, since the
discarded expression was still registered as a use of the weak property.

rdar://66162246

Differential revision: https://reviews.llvm.org/D87102