[PATCH] D138947: [Clang] Remove invalid assert from Sema::BuildCXXTypeConstructExpr
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 29 18:34:44 PST 2022
shafik added inline comments.
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:1464
- (Exprs.size() == 1 && isa<InitListExpr>(Exprs[0]))) &&
- "List initialization must have initializer list as expression.");
SourceRange FullRange = SourceRange(TyBeginLoc, RParenOrBraceLoc);
----------------
cor3ntin wrote:
> `Exprs.size() == 1` should still be true, right? Is it worth keeping? Maybe?
> Similarly, is `ListInitialization` the right name here? Maybe `ParsedAsListInitialization` or something? Or a Fixme?
I believe `ListInitialization` is still correct as I mentioned in this bug report: https://github.com/llvm/llvm-project/issues/58302 it is still list initialization.
You have a point it may be worth it to just remove `&& isa<InitListExpr>(Exprs[0])`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138947/new/
https://reviews.llvm.org/D138947
More information about the cfe-commits
mailing list