Files
clang-p2996/clang/unittests/AST/ASTExprTest.cpp
Reid Kleckner 3c42e10afd 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>
2024-02-08 14:27:14 -08:00

3.8 KiB