[all-commits] [llvm/llvm-project] cad6bb: [C++20][Modules] Fix crash/compiler error due brok...

Dmitry Polukhin via All-commits all-commits at lists.llvm.org
Thu Jan 23 02:36:21 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cad6bbade0d7dc57b9c43d9ed8c38260345d50bf
      https://github.com/llvm/llvm-project/commit/cad6bbade0d7dc57b9c43d9ed8c38260345d50bf
  Author: Dmitry Polukhin <34227995+dmpolukhin at users.noreply.github.com>
  Date:   2025-01-23 (Thu, 23 Jan 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Serialization/ASTReader.h
    M clang/lib/Serialization/ASTWriterDecl.cpp
    A clang/test/Headers/crash-instantiated-in-scope-cxx-modules5.cpp

  Log Message:
  -----------
  [C++20][Modules] Fix crash/compiler error due broken AST links (#123648)

Summary:
This PR fixes bugreport
https://github.com/llvm/llvm-project/issues/122493 The root problem is
the same as before lambda function and DeclRefExpr references a variable
that does not belong to the same module as the enclosing function body.
Therefore iteration over the function body doesn’t visit the VarDecl.
Before this change RelatedDeclsMap was created only for canonical decl
but in reality it has to be done for the definition of the function that
does not always match the canonical decl.

Test Plan: check-clang



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list