Skip to content

C++ out-of-class template member definitions are missed: Foo<A, B>::method(...) (364 of 385 in the DOOM corpus, doom3-bfg 326) #5462

Closed

Description

@squid-protocol

Problem

C++ func_start (gitgalaxy/standards/language_standards/languages/cpp.py:178, out-of-line fixes noted at :127) does not match a member function of a class template defined outside the class:

template<uint8_t WIDTH, uint8_t HEIGHT>
void Adafruit_SSD1306<WIDTH, HEIGHT>::drawPixel(int16_t x, int16_t y, uint16_t color) {

doom-nano SSD1306.cpp: 0 functions (ctags 13). Corpus (first-party C++, Name<...>::method( followed by a body): 385 definitions, 364 missed — doom3-bfg 334/326 (idList<type>::, idHashTable<Type>::), psydoom 16/9, zandronum 10/8, doom-nano 10/10, gzdoom 9/7, vizdoom 6/4.

Class: qualified out-of-line definition forms

member status
Cls::m(...) handled
Cls<T>::m(...), Cls<A, B>::m(...) missing
nested Outer<T>::Inner::m, ns::Cls<T>::m missing (verify)
Cls<T>::~Cls(), Cls<T>::Cls(...) ctor/dtor missing (verify)
Cls<T>::operator[](...) verify
template<> void Cls<int>::m() explicit specialisation verify

Acceptance

  • Every member above is extracted as a function named by its unqualified name (or qualified, matching existing convention), with a fixture covering each form, including template args with nested <> and default values.
  • Rescan doom3-bfg and doom-nano: these definitions are present and the C++ function count stays within 3% of ctags.

Part of #5457 (milestone DOOM Port Speedrun).

Evidence: /srv/storage_16tb/projects/gitgalaxy/doom-study/ — round2_findings.md, clean_check.csv, clean_check_details.json; scans in scans_r2/<port>/ at engine 585c243e9; corpus variants_r2.csv (39 ports, pinned SHAs); scorer scripts/clean_check.py.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    core-engine
    needs:doom-corpus
    scope:core
    on Oct 18, 2026
  2. squid-protocol commented on Oct 18, 2026

    @squid-protocol
    OwnerAuthor

    PR #5495 fixed the template-qualified forms in the table (tested, raw func_start matches doom-nano 13/13 and doom3-bfg 362). Leaving this open: the acceptance rescan of doom3-bfg and doom-nano with the C++ function count within 3% of ctags is still not done.

  3. squid-protocol commented on Oct 19, 2026

    @squid-protocol
    OwnerAuthor

    PR #5572 covers the post-parameter tail class. Remaining sibling gaps: (1) lambdas (counting convention vs ctags), (2) argument-list specifier macros f() MY_ATTR(1, 2) { need a discriminator vs #5461 macro chains, (3) C __THROW trailing macros in c.py unchecked.

  4. 5 remaining items

  5. squid-protocol commented on Oct 21, 2026

    @squid-protocol
    OwnerAuthor

    Churn review: template-qualified member definitions are fixed on main (PR #5495, tests in test_cpp_template_member.py). doom3-bfg is +0.8% vs ctags. doom-nano is +7.7%, all from input.cpp where #ifdef/#else alternate definitions are both counted, a counting convention rather than a template shape. Leaving open until the owner rules on that convention.

  6. squid-protocol commented on Oct 21, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5462-20261021T0509Z (host nyx) ended without a PR. already fixed by #5495; issue left open: doom-nano +7.7% from #ifdef/#else counting convention (owner call)

  7. added
    scope:frontier
    and removed
    scope:core
    on Oct 21, 2026
  8. squid-protocol commented on Oct 21, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-10-21T22:31Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  9. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Owner ruling nyx-o9 (2026-10-21): keep counting both alternate definitions. A static scan cannot know the build configuration, so both #ifdef/#else branches are real source.

    Numbers behind the ruling: doom3-bfg +0.8% vs ctags; doom-nano +7.7%, all from input.cpp (alternate definitions both counted). This is a counting convention, not a template shape, so the 3% acceptance bound does not apply to these alternates.

    The convention is recorded in the DOOM speedrun README, "Known blind spots", in #5939.

    Closing as fixed by #5495 (template-qualified out-of-line members, merged 2026-10-18).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugclaim:nyxcore-engineneeds:doom-corpuspriority: mediumscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions