snmalloc icon indicating copy to clipboard operation
snmalloc copied to clipboard

[build][clang 19+] `missing-template-arg-list-after-template-kw` is triggered during the build

Open SchrodingerZhu opened this issue 1 year ago • 1 comments

See https://github.com/SchrodingerZhu/ReuseIR/actions/runs/10536186246/job/29196068023

--- stderr
  In file included from /home/schrodinger/ReuseIR/reuse-runtime/src/allocator.cpp:1:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/snmalloc.h:4:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/snmalloc_core.h:3:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/backend_helpers.h:1:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/mem.h:3:
  /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/corealloc.h:498:37: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    498 |           Config::Backend::template get_metaentry(snmalloc::address_cast(msg));
        |                                     ^
  /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/corealloc.h:689:35: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    689 |         Config::Backend::template get_metaentry(snmalloc::address_cast(p));
        |                                   ^
  In file included from /home/schrodinger/ReuseIR/reuse-runtime/src/allocator.cpp:1:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/snmalloc.h:4:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/snmalloc_core.h:3:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/backend_helpers.h:1:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/mem.h:7:
  In file included from /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/globalalloc.h:4:
  /home/schrodinger/ReuseIR/target/release/build/reuse-runtime-9fde60c52cd128ae/out/build/_deps/snmalloc-src/src/snmalloc/backend_helpers/../mem/localalloc.h:828:35: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    828 |         Config::Backend::template get_metaentry(address_cast(p));
        |                                   ^
  3 errors generated.

SchrodingerZhu avatar Aug 24 '24 05:08 SchrodingerZhu

Sorry hadn't spotted this. Should we just add <> like:

Config::Backend::template get_metaentry<>(address_cast(p));

Does that fix the issue? Or can we drop the template keyword in this instance?

mjp41 avatar Sep 24 '24 10:09 mjp41

@mjp41 removing the template will do the work.

SchrodingerZhu avatar Nov 04 '24 15:11 SchrodingerZhu

Apparently fixed in main branch

jorisgeer avatar Nov 09 '24 19:11 jorisgeer