[all-commits] [llvm/llvm-project] 803b79: [SemaObjC] Fix a -Wbridge-cast false-positive

Erik Pilkington via All-commits all-commits at lists.llvm.org
Mon Apr 5 08:43:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 803b79221edfc2517e6bfc373e5f55609565b0e4
      https://github.com/llvm/llvm-project/commit/803b79221edfc2517e6bfc373e5f55609565b0e4
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2021-04-05 (Mon, 05 Apr 2021)

  Changed paths:
    M clang/lib/Sema/SemaExprObjC.cpp
    A clang/test/SemaObjCXX/bridge-cast-redecl.mm

  Log Message:
  -----------
  [SemaObjC] Fix a -Wbridge-cast false-positive

Clang used to emit a bad -Wbridge-cast diagnostic on the cast in the attached
test. This was because, after 09abecef7, struct __CFString was not added to
lookup, so the objc_bridge attribute wasn't getting duplicated onto the most
recent declaration, causing us to fail to find it in getObjCBridgeAttr. This
patch fixes this by instead walking through the redeclarations to find an
appropriate bridge attribute. rdar://72823399

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




More information about the All-commits mailing list