[PATCH] D99165: [clang] Fix a crash on checkDestructorReference.

2021-03-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for digging! Comment at: clang/lib/AST/Type.cpp:2234 // (C++ [dcl.array]p1). -// We don't handle variable arrays (they're not allowed in C++) or -//

[PATCH] D99165: [clang] Fix a crash on checkDestructorReference.

2021-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D99165#2644243 , @sammccall wrote: > The fix doesn't look obviously correct: the side effect of marking the > destructor reference seems important if we actually generate code. It's not > obvious to me why the type can only be

[PATCH] D99165: [clang] Fix a crash on checkDestructorReference.

2021-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 332925. hokein added a comment. - jrefine the fix of the crash: if the element type of an variable-length array is incomplete, the array type is incomplete; - simplify the testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D99165: [clang] Fix a crash on checkDestructorReference.

2021-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: erik.pilkington. sammccall added a comment. The fix doesn't look obviously correct: the side effect of marking the destructor reference seems important if we actually generate code. It's not obvious to me why the type can only be incomplete if there are errors. Thi

[PATCH] D99165: [clang] Fix a crash on checkDestructorReference.

2021-03-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. hokein requested review of this revision. Herald added a project: clang. The LookupDestructor requires a complete class definition, the callside (checkDesturctorReference) didnt't guarantee that. Repository: rG LLVM Github Monor