[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-30 Thread Alan Zhao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7df3c71b508b: [clang] Fix 2 bugs with parenthesized aggregate initialization (authored by ayzhao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 __

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 509160. ayzhao marked an inline comment as done. ayzhao added a comment. fix stray whitespace change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files: clang/lib

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 2 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1582-1596 + MultiExprArg ExprsToPass; + if (Exprs.size() == 1 && isa(Exprs[0])) { +// C++20 [expr.static.cast]p4: +// An expression E can be explicitly co

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 509158. ayzhao added a comment. use ParenListExpr and fix getSubExprAsWritten(...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files: clang/lib/AST/Expr.cpp cl

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1582-1596 + MultiExprArg ExprsToPass; + if (Exprs.size() == 1 && isa(Exprs[0])) { +// C++20 [expr.static.cast]p4: +// An expression E can be explicitly converted to a type T...if T is an +//

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1582-1596 + MultiExprArg ExprsToPass; + if (Exprs.size() == 1 && isa(Exprs[0])) { +// C++20 [expr.static.cast]p4: +// An expression E can be explicitly converted to a type T...if T is an +//

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1582-1596 + MultiExprArg ExprsToPass; + if (Exprs.size() == 1 && isa(Exprs[0])) { +// C++20 [expr.static.cast]p4: +// An expression E can be explicitly converted to a type T...if T is an +//

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 506755. ayzhao added a comment. remove extra semicolon Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files: clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaIni

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 506754. ayzhao added a comment. clean up test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files: clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaInit.cpp c

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Fix an issue where temporaries initialized via parenthesized aggregate initialization don't get destroyed. - Fix an issue w