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>
Update function bodies to forward forwarding references.
I spotted this while authoring a clang-tidy tool for CppCoreGuideline F.19
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D143877