`A5-16-1`: Ternary operator not used as a sub expression
nbusser opened this issue · 1 comments
nbusser commented
Affected rules
- A5-16-1
Description
CodeQL triggers A5-16-1 on a plain ternary expression.
Example
const auto smallestSet = (setA.size() < setB.size() ? setA : setB);lcartey commented
Thanks for this report! This is because the parentheses in your example are considered as the parent of ternary expression. However, one of the rule examples makes it clear that this case should be excluded.