Remove base::MakeClampedNum() [chromium/src : main]

0 views
Skip to first unread message

Tom Sepez (Gerrit)

unread,
Jan 15, 2026, 7:07:20 PM (2 days ago) Jan 15
to Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
Attention needed from Daniel Cheng

Tom Sepez added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Tom Sepez . resolved

And now the other type ...

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
Gerrit-Change-Number: 7487534
Gerrit-PatchSet: 5
Gerrit-Owner: Tom Sepez <tse...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Fri, 16 Jan 2026 00:07:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jan 15, 2026, 7:18:46 PM (2 days ago) Jan 15
to blink-...@chromium.org
Attention needed from Tom Sepez

Daniel Cheng added 1 comment

File base/numerics/clamped_math.h
Line 181, Patchset 5 (Latest):ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
Daniel Cheng . unresolved

Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

Open in Gerrit

Related details

Attention is currently required from:
  • Tom Sepez
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
    Gerrit-Change-Number: 7487534
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tom Sepez <tse...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 00:18:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tom Sepez (Gerrit)

    unread,
    Jan 15, 2026, 7:22:17 PM (2 days ago) Jan 15
    to Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
    Attention needed from Daniel Cheng

    Tom Sepez added 1 comment

    File base/numerics/clamped_math.h
    Line 181, Patchset 5 (Latest):ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
    Daniel Cheng . unresolved

    Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

    Tom Sepez

    Because nobody is dumb enough to write CheckedNumeric<enum> but someone wrote ClampedNumeric<enum>() via a cascade of macro expansions.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
    Gerrit-Change-Number: 7487534
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tom Sepez <tse...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 00:22:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Jan 15, 2026, 7:25:09 PM (2 days ago) Jan 15
    to Tom Sepez, Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
    Attention needed from Tom Sepez

    Daniel Cheng added 1 comment

    File base/numerics/clamped_math.h
    Line 181, Patchset 5 (Latest):ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
    Daniel Cheng . unresolved

    Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

    Tom Sepez

    Because nobody is dumb enough to write CheckedNumeric<enum> but someone wrote ClampedNumeric<enum>() via a cascade of macro expansions.

    Daniel Cheng

    Should we make that conversion explicit rather than having it helpfully/silently work? It seems kind of unexpected to me.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Tom Sepez
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
    Gerrit-Change-Number: 7487534
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tom Sepez <tse...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 00:24:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Tom Sepez <tse...@chromium.org>
    Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tom Sepez (Gerrit)

    unread,
    Jan 15, 2026, 7:26:32 PM (2 days ago) Jan 15
    to Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
    Attention needed from Daniel Cheng

    Tom Sepez added 1 comment

    File base/numerics/clamped_math.h
    Line 181, Patchset 5 (Latest):ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
    Daniel Cheng . unresolved

    Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

    Tom Sepez

    Because nobody is dumb enough to write CheckedNumeric<enum> but someone wrote ClampedNumeric<enum>() via a cascade of macro expansions.

    Daniel Cheng

    Should we make that conversion explicit rather than having it helpfully/silently work? It seems kind of unexpected to me.

    Tom Sepez

    follow-on? This disrupts enough files as is?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
    Gerrit-Change-Number: 7487534
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tom Sepez <tse...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 00:26:15 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Jan 15, 2026, 7:30:58 PM (2 days ago) Jan 15
    to Tom Sepez, Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
    Attention needed from Tom Sepez

    Daniel Cheng added 1 comment

    File base/numerics/clamped_math.h
    Line 181, Patchset 5 (Latest):ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
    Daniel Cheng . unresolved

    Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

    Tom Sepez

    Because nobody is dumb enough to write CheckedNumeric<enum> but someone wrote ClampedNumeric<enum>() via a cascade of macro expansions.

    Daniel Cheng

    Should we make that conversion explicit rather than having it helpfully/silently work? It seems kind of unexpected to me.

    Tom Sepez

    follow-on? This disrupts enough files as is?

    Daniel Cheng

    I think we should fix that first (by making MakeClampedNum not use UnderylingType<T>) rather than allowing CTAD to deduce to UnderlyingType.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Tom Sepez
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
    Gerrit-Change-Number: 7487534
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tom Sepez <tse...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Tom Sepez <tse...@chromium.org>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 00:30:45 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tom Sepez (Gerrit)

    unread,
    Jan 15, 2026, 7:51:27 PM (2 days ago) Jan 15
    to Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org

    Tom Sepez added 1 comment

    File base/numerics/clamped_math.h
    Line 181, Patchset 5:ClampedNumeric(T) -> ClampedNumeric<UnderlyingType<T>>;
    Daniel Cheng . resolved

    Can you remind me why we use UnderlyingType here? We don't for CheckedNumeric.

    Tom Sepez

    Because nobody is dumb enough to write CheckedNumeric<enum> but someone wrote ClampedNumeric<enum>() via a cascade of macro expansions.

    Daniel Cheng

    Should we make that conversion explicit rather than having it helpfully/silently work? It seems kind of unexpected to me.

    Tom Sepez

    follow-on? This disrupts enough files as is?

    Tom Sepez

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
      Gerrit-Change-Number: 7487534
      Gerrit-PatchSet: 5
      Gerrit-Owner: Tom Sepez <tse...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Comment-Date: Fri, 16 Jan 2026 00:51:16 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Tom Sepez (Gerrit)

      unread,
      Jan 16, 2026, 7:16:22 PM (19 hours ago) Jan 16
      to Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, pmonett...@chromium.org, caitkp...@chromium.org, chikamu...@chromium.org, mac-r...@chromium.org, scheduler-...@chromium.org, mattreyno...@chromium.org, olka+...@chromium.org, jophba...@chromium.org, hashimo...@chromium.org, marinacio...@chromium.org, tbansal+...@chromium.org, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org

      Tom Sepez voted and added 1 comment

      Votes added by Tom Sepez

      Commit-Queue+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Tom Sepez . resolved

      Howzabout now?

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
      Gerrit-Change-Number: 7487534
      Gerrit-PatchSet: 9
      Gerrit-Owner: Tom Sepez <tse...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Comment-Date: Sat, 17 Jan 2026 00:16:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Cheng (Gerrit)

      unread,
      Jan 16, 2026, 8:15:22 PM (18 hours ago) Jan 16
      to Tom Sepez, Daniel Cheng, Chromium LUCI CQ, Dirk Schulze, Stephen Chenney, AyeAye, chromium...@chromium.org, Kentaro Hara, pmonett...@chromium.org, caitkp...@chromium.org, chikamu...@chromium.org, mac-r...@chromium.org, scheduler-...@chromium.org, mattreyno...@chromium.org, olka+...@chromium.org, jophba...@chromium.org, hashimo...@chromium.org, marinacio...@chromium.org, tbansal+...@chromium.org, blink-reviews-p...@chromium.org, bnc+...@chromium.org, kinuko...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, drott+bl...@chromium.org, net-r...@chromium.org, alexmt...@chromium.org, tommyw+w...@chromium.org, fserb...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
      Attention needed from Tom Sepez

      Daniel Cheng voted and added 1 comment

      Votes added by Daniel Cheng

      Code-Review+1
      Owners-Override+1

      1 comment

      Patchset-level comments
      Daniel Cheng . resolved

      LGTM

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Tom Sepez
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I17d96bbaf2bc6a9133a83e21acad99efc762b81b
      Gerrit-Change-Number: 7487534
      Gerrit-PatchSet: 9
      Gerrit-Owner: Tom Sepez <tse...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Attention: Tom Sepez <tse...@chromium.org>
      Gerrit-Comment-Date: Sat, 17 Jan 2026 01:15:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages