[all-commits] [llvm/llvm-project] 8b81eb: [ubsan] Null-check and adjust TypeLoc before using it

Vedant Kumar via All-commits all-commits at lists.llvm.org
Mon Feb 10 14:10:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b81ebfe7eba089ed2016d523cc5ee9d05e957a7
      https://github.com/llvm/llvm-project/commit/8b81ebfe7eba089ed2016d523cc5ee9d05e957a7
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    A clang/test/CodeGenObjCXX/ubsan-nullability-return-notypeloc.mm

  Log Message:
  -----------
  [ubsan] Null-check and adjust TypeLoc before using it

Null-check and adjut a TypeLoc before casting it to a FunctionTypeLoc.
This fixes a crash in -fsanitize=nullability-return, and also makes the
location of the nonnull type available when the return type is adjusted.

rdar://59263039

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




More information about the All-commits mailing list