A variable declared auto is initialized with = {...}, which makes it a std::initializer_list
What it finds
auto x = {1}; deduces std::initializer_list<int>, not int; the list refers to a temporary array that dies at the end of the full expression in some uses. auto x = 1; or auto x{1}; deduce the element type.
From the rule's source, auto_from_brace_list.rs.
Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/cpp:auto-from-brace-list" = "note"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/cpp:auto-from-brace-list] reason="..."tx0 explain tx0/cpp:auto-from-brace-list shows the same in the terminal. Found a false positive? Report it.