[all-commits] [llvm/llvm-project] e27b5f: [clang][AST] Fix crash when printing error

Ellis Hoag via All-commits all-commits at lists.llvm.org
Sun Jan 2 18:03:55 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e27b5f9371382952eb5482ad151bb6fcb4cd0d7c
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2022-01-02 (Sun, 02 Jan 2022)

  Changed paths:
    M clang/lib/AST/TypePrinter.cpp
    M clang/test/Sema/nullability.c

  Log Message:
  [clang][AST] Fix crash when printing error

Clang will crash if it tries to compile the following code. This commit
fixes it.
$ cat foo.c
void foo(_Nullable int *ptr) {
    __auto_type _Nonnull a = ptr;
$ clang foo.c -c -Wnullable-to-nonnull-conversion

Reviewed By: sammccall

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

More information about the All-commits mailing list