[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG32d7aae04fdb: [clang] Fix a clang crash on invalid code in C++20 mode. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 485076. hokein marked 2 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140587/new/ https://reviews.llvm.org/D140587 Files: clang/lib/Sema/SemaI

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM to unbreak clangd, this seems to pop up a lot for Chrome developers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140587/new/

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: ayzhao, ilya-biryukov. ilya-biryukov added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6177 // constructors. For example, conversion function. if (const auto *RD = dyn_cast(DestType->getAs()->getDecl());

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D140587#4014437 , @shafik wrote: > Thank you for the fix, can you explain the failure case in more detail and > why checking that `RD` is defined is the correct fix. The `RD->isAggregate()` needs to access the member of `data(

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for the fix, can you explain the failure case in more detail and why checking that `RD` is defined is the correct fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140587/new/ https://reviews.llvm.org/D140587 __

[PATCH] D140587: [clang] Fix a clang crash on invalid code in C++20 mode.

2022-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. This crash is a combination of recovery-expr + new SemaInit.cpp code introduced by by https://reviews.llvm.org/D129531. Reposito