Consider aggregate bases when checking if an InitListExpr is constant (#80519)
This code was correct as written prior to C++17, which allowed bases to
appear in the initializer list.
This was observable by creating non-constant aggregate initialization at
file scope in a compound literal, but since that behavior will change
soon if we implement support for dynamic initialization, I also added a
unit test for `isConstantInitializer`.
This fixes at least one part of issue #80510 .
---------
Co-authored-by:
Aaron Ballman <aaron@aaronballman.com>
parent
7b5a9bb8
Please register or sign in to comment