[all-commits] [llvm/llvm-project] 54d4a2: [LLDB] Fix assertion failure by removing `CopyType...

Adrian Vogelsgesang via All-commits all-commits at lists.llvm.org
Wed Feb 8 10:23:32 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54d4a2550d3167d51a9d386d9823a06aca459531
      https://github.com/llvm/llvm-project/commit/54d4a2550d3167d51a9d386d9823a06aca459531
  Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M lldb/source/Plugins/Language/CPlusPlus/Coroutines.cpp
    M lldb/source/Plugins/Language/CPlusPlus/Coroutines.h

  Log Message:
  -----------
  [LLDB] Fix assertion failure by removing `CopyType` in `std::coroutine_handle` pretty printer

The pretty printer for `std::coroutine_handle` was running into
> Assertion failed: (target_ctx != source_ctx && "Can't import into itself")
from ClangASTImporter.h, line 270.

This commit fixes the issue by removing the `CopyType` call from the
pretty printer. While this call was necessary in the past, it seems to
be no longer required, at least all test cases are still passing. Maybe
something changed in the meantime around the handling of `TypesystemClang`
instances. I don't quite understand why `CopyType` was necessary earlier.

I am not sure how to add a regression test for this, though. It seems
the issue is already triggered by the exising `TestCoroutineHandle.py`,
but API tests seem to ignore all violations of `lldbassert` and still
report the test as "passed", even if assertions were triggered

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




More information about the All-commits mailing list