[all-commits] [llvm/llvm-project] 0f1be8: [Sema] Fix a -Warc-repeated-use-of-weak false-posi...

Erik Pilkington via All-commits all-commits at lists.llvm.org
Thu Sep 3 13:57:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f1be87e294751a0941f1d9b7785ebf4d8072149
      https://github.com/llvm/llvm-project/commit/0f1be87e294751a0941f1d9b7785ebf4d8072149
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaObjC/arc-repeated-weak.mm

  Log Message:
  -----------
  [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




More information about the All-commits mailing list