Unverified Commit 3c42e10a authored by Reid Kleckner's avatar Reid Kleckner Committed by GitHub
Browse files

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: default avatarAaron Ballman <aaron@aaronballman.com>
parent 7b5a9bb8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment