[all-commits] [llvm/llvm-project] b6d9ca: Do not crash when trying to encode a _BitInt type

Aaron Ballman via All-commits all-commits at lists.llvm.org
Fri Jan 28 05:38:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6d9ca14c20f6f982a9fee4bebccf4761400f6aa
      https://github.com/llvm/llvm-project/commit/b6d9ca14c20f6f982a9fee4bebccf4761400f6aa
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    A clang/test/CodeGenObjC/encode-test-bitint.m

  Log Message:
  -----------
  Do not crash when trying to encode a _BitInt type

Using a _BitInt (or _ExtInt) type as a block parameter or block return
type hits an "unreachable" when trying to determine the encoding for
the block. Instead of crashing, this patch handles it like some of the
other types for which we don't yet have an encoding. The test case
verifies we no longer crash, but does not verify that we provide any
particular encoding (it can be updated once someone more familiar with
ObjC steps in to define the encoding).

Fixes PR50503.




More information about the All-commits mailing list