Currently clang accepts a default argument containing an odr-used structured binding which is not odr-usable here:
void test() { struct S { int i, j; }; auto [x, y] = S(); extern void h(int = x); // Should be rejected. }
It was not entirely clear in C++17 that this was forbidden since [dcl.fct.default]p7 only used the term "local variable". However this is clearly forbidden in C++20 with the new wording in term of odr-usable local entities.
Since you're emitting a specific warning, I think you can just hardcode the expected types here instead of using const auto&.... Alternatively you could guess the integer argument from the (dynamic) type of the VarDecl argument.