[all-commits] [llvm/llvm-project] ffac14: [Clang] [Sema] Document invariant in Sema::AddOver...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Fri Apr 11 08:38:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ffac1404f8e0f606cac12a21777dfe700b455e87
      https://github.com/llvm/llvm-project/commit/ffac1404f8e0f606cac12a21777dfe700b455e87
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M clang/lib/Sema/SemaOverload.cpp

  Log Message:
  -----------
  [Clang] [Sema] Document invariant in Sema::AddOverloadCandidate (#135256)

Static analysis flagged 1 - ArgIdx in Sema::AddOverloadCandidate for its
potential to overflow.

Turns out this is intentional since when PO ==
OverloadCandidateParamOrder::Reversed Args.size() is always two, so this
will never overflow.

We document using an assert.

Fixes: https://github.com/llvm/llvm-project/issues/135086



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