[all-commits] [llvm/llvm-project] 5485c7: [clang] fix redecl chain assumption when checking ...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue Aug 19 10:32:31 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5485c7021aca771f782c2fc1bc5e913dbed0ddc8
      https://github.com/llvm/llvm-project/commit/5485c7021aca771f782c2fc1bc5e913dbed0ddc8
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-08-19 (Tue, 19 Aug 2025)

  Changed paths:
    M clang/lib/AST/Decl.cpp
    A clang/test/Modules/GH153933.cpp

  Log Message:
  -----------
  [clang] fix redecl chain assumption when checking linkage consistency (#153996)

In C++, it can be assumed the same linkage will be computed for all
redeclarations of an entity, and we have assertions to check this.

However, the linkage for a declaration can be requested in the middle of
deserealization, and at this point the redecl chain is not well formed,
as computation of the most recent declaration is deferred.

This patch makes that assertion work even in such conditions.

This fixes a regression introduced in
https://github.com/llvm/llvm-project/pull/147835, which was never
released, so there are no release notes for this.

Fixes #153933



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