[all-commits] [llvm/llvm-project] adab08: [clang][Sema] Fix crash on invalid base destructor
kadir çetinkaya via All-commits
all-commits at lists.llvm.org
Wed Oct 5 06:23:37 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: adab08ecf2bdeb84dc7d2009d4c0c13617db9c58
https://github.com/llvm/llvm-project/commit/adab08ecf2bdeb84dc7d2009d4c0c13617db9c58
Author: Kadir Cetinkaya <kadircet at google.com>
Date: 2022-10-05 (Wed, 05 Oct 2022)
Changed paths:
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaLookup.cpp
M clang/test/SemaCXX/destructor.cpp
Log Message:
-----------
[clang][Sema] Fix crash on invalid base destructor
LookupSpecialMember might fail, so changes the cast to cast_or_null.
Inside Sema, skip a particular base, similar to other cases, rather than
asserting on dtor showing up.
Other option would be to mark classes with invalid destructors as invalid, but
that seems like a lot more invasive and we do lose lots of diagnostics that
currently work on classes with broken members.
Differential Revision: https://reviews.llvm.org/D135254
More information about the All-commits
mailing list