[all-commits] [llvm/llvm-project] 035e76: [Serialization] Clear moved-from deque to ensure v...

smanna12 via All-commits all-commits at lists.llvm.org
Mon Jul 1 05:51:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 035e76ff3706ee3e677fbae67cf47a343cf6eceb
      https://github.com/llvm/llvm-project/commit/035e76ff3706ee3e677fbae67cf47a343cf6eceb
  Author: smanna12 <soumi.manna at intel.com>
  Date:   2024-07-01 (Mon, 01 Jul 2024)

  Changed paths:
    M clang/lib/Serialization/ASTReaderDecl.cpp

  Log Message:
  -----------
  [Serialization] Clear moved-from deque to ensure valid state post-move (#97221)

This patch addresses a use-after-move issue, reported by static analyzer
tool, by clearing the `PotentiallyInterestingDecls` deque after it has
been moved to `MaybeInterestingDecls`.

The fix ensures that the subsequent assert statement correctly checks
for an empty state, preventing any undefined behavior in
ASTReader::PassInterestingDeclsToConsumer().



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