[all-commits] [llvm/llvm-project] ea201e: [AST][ObjC] Fix crash when printing invalid objc c...

David Goldman via All-commits all-commits at lists.llvm.org
Fri Jul 10 12:36:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ea201e83e292f39c3ee7fe8810a348ee98000398
      https://github.com/llvm/llvm-project/commit/ea201e83e292f39c3ee7fe8810a348ee98000398
  Author: David Goldman <davg at google.com>
  Date:   2020-07-10 (Fri, 10 Jul 2020)

  Changed paths:
    M clang/lib/AST/DeclPrinter.cpp
    M clang/unittests/AST/DeclPrinterTest.cpp

  Log Message:
  -----------
  [AST][ObjC] Fix crash when printing invalid objc categories

Summary:
If no valid interface definition was found previously we would crash.

With this change instead we just print `<<error-type>>` in place
of the NULL interface. In the future this could be improved by
saving the invalid interface's name and using that.

Reviewers: sammccall, gribozavr

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list