[all-commits] [llvm/llvm-project] ab51ec: [Serialization] Handle uninitialized type constraints

Florian Albrechtskirchinger via All-commits all-commits at lists.llvm.org
Tue Oct 29 03:10:05 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ab51eccf88f5321e7c60591c5546b254b6afab99
      https://github.com/llvm/llvm-project/commit/ab51eccf88f5321e7c60591c5546b254b6afab99
  Author: Florian Albrechtskirchinger <falbrechtskirchinger at gmail.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/test/PCH/cxx2a-constraints-crash.cpp

  Log Message:
  -----------
  [Serialization] Handle uninitialized type constraints

The ASTWriter currently assumes template type constraints to be
initialized ((bool)getTypeConstraint() == hasTypeConstraint()). Issues
#99036 and #109354 identified a scenario where this assertion is
violated.

This patch removes the assumption and adds another boolean to the
serialization, to explicitly encode whether the type constraint has been
initialized.

The same issue was incidentally fixed on the main branch by #111179.
This solution avoids backporting #111179 and its dependencies.



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