-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][dataflow] fix failing assert in copyRecord
When dealing with copy constructor, the compiler can emit an UncheckedDerivedToBase implicit cast for the CXXConstructorExpr of the base class. In such case, when trying to copy the src storage location to its destination, we will fail on the assert checking that location types are the same. When copying from derived to base class, it is acceptable to break that assumption to only copy common fields from the base class. Note: the provided test crashes the process without the changes made to copyRecord. Differential Revision: https://reviews.llvm.org/D155844
- Loading branch information
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters