[all-commits] [llvm/llvm-project] a146bd: [clang] Fix single-element array initialization in...
Mariya Podchishchaeva via All-commits
all-commits at lists.llvm.org
Wed Mar 8 05:18:21 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: a146bdc32034dca21f09c97f99691aa8c0939e97
https://github.com/llvm/llvm-project/commit/a146bdc32034dca21f09c97f99691aa8c0939e97
Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M clang/lib/AST/ExprConstant.cpp
A clang/test/SemaCXX/constexpr-single-element-array.cpp
Log Message:
-----------
[clang] Fix single-element array initialization in constexpr
https://reviews.llvm.org/D130791 added an improvement that in case array
element has a trivial constructor, it is evaluated once and the result is
re-used for remaining elements. Make sure the constructor is evaluated
for single-elements arrays too.
Fixes https://github.com/llvm/llvm-project/issues/60803
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D145486
(cherry picked from commit af682f0df83f3364dac7ab92f39c7209dfbce28a)
More information about the All-commits
mailing list