Assuming that the code compiles, bugreports coming from constexpr
variable initializer expressions are by definition false-positives.
There is code smell-ish bugreports, like
alpha.deadcode.UnreachableCode but suppressing everything doesn't feel
that bad overall.
Ideally, we should outright skip the evaluation of the constexpr
variable initializer expression evaluation, but I could not find a grasp
achieving that.
Since we walk the CFG block, the expression-tree of the initializer is
sequenced before the variable declaration. We could only infer from the
variable declaration that the evaluation of the previous instruction
must have been evaluated in constexpr context.
What we could do is to replace the SVal associated with the
initializer expression, saying that the Expr::EvaluateAsConstantExpr()
is either the same or more accurate than the analyzer engine itself.
According to the analyzer tests, I could not see any difference though.