[all-commits] [llvm/llvm-project] fbb499: [AST] Fix crashes caused by redeclarations in hidd...

Ben Barham via All-commits all-commits at lists.llvm.org
Thu Oct 8 19:50:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fbb499ef255b77c5a3300543de88956b13e706b7
      https://github.com/llvm/llvm-project/commit/fbb499ef255b77c5a3300543de88956b13e706b7
  Author: Ben Barham <ben_barham at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M clang/lib/AST/DeclObjC.cpp
    A clang/test/Index/Inputs/hidden-redecls-sub.h
    A clang/test/Index/Inputs/hidden-redecls.h
    M clang/test/Index/Inputs/module.map
    A clang/test/Index/hidden-redecls.m

  Log Message:
  -----------
  [AST] Fix crashes caused by redeclarations in hidden prototypes

ObjCContainerDecl.getMethod returns a nullptr by default when the
container is a hidden prototype. Callsites where the method is being
looked up on the redeclaration's own container should skip this check
since they (rightly) expect a valid method to be found.

Resolves rdar://69444243

Reviewed By: akyrtzi

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




More information about the All-commits mailing list