[all-commits] [llvm/llvm-project] 7a2b1b: [clang] Do not crash in APValue::prettyPrint() on ...

Adam Czachorowski via All-commits all-commits at lists.llvm.org
Wed Nov 10 08:17:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a2b1bdb4c8a099ebc38b7f802988244ad21fcc0
      https://github.com/llvm/llvm-project/commit/7a2b1bdb4c8a099ebc38b7f802988244ad21fcc0
  Author: Adam Czachorowski <adamcz at google.com>
  Date:   2021-11-10 (Wed, 10 Nov 2021)

  Changed paths:
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang/lib/AST/APValue.cpp

  Log Message:
  -----------
  [clang] Do not crash in APValue::prettyPrint() on forward-decl structs.

The call to getTypeSizeInChars() is replaced with
getTypeSizeInCharsIfKnown(), which does not crash on forward declared
structs. This only affects printing.

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




More information about the All-commits mailing list