[core] Catch heap allocating helper calls with explicit template arguments (#20391)

This commit is contained in:
J. Nick Koston
2026-10-10 02:00:41 +00:00
committed by GitHub
parent 41cc96bbb8
commit 0ae24f7536
3 changed files with 33 additions and 10 deletions
+2 -1
View File
@@ -1065,7 +1065,8 @@ HEAP_ALLOCATING_HELPERS = {
r"str_sprintf|"
r"str_snprintf|"
r"value_accuracy_to_string"
r")\s*\(" + CPP_RE_EOL,
# Explicit template arguments at any nesting depth, e.g. format_hex<std::array<uint8_t, 4>>(
r")\s*(?:<[^;{}()\n]*>\s*)?\(" + CPP_RE_EOL,
include=cpp_include,
exclude=[
# The definitions themselves