Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sema][SVE] Don't allow sizeless objects to be thrown
Summary: The same rules for throwing and catching incomplete types also apply to sizeless types. This patch enforces that for throw statements. It also make sure that we use "sizeless type" rather "incomplete type" in the associated message. (Both are correct, but "sizeless type" is more specific and hopefully more user-friendly.) The SVE ACLE simply extends the rule for incomplete types to sizeless types. However, throwing pointers to sizeless types should not pose any real difficulty, so as an extension, the clang implementation allows that. Reviewers: sdesmalen, efriedma, rovka, rjmccall Subscribers: tschuett, rkruppe, psnobl, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76088
- Loading branch information
1 parent
f5e0f8b
commit c47f971
Showing
3 changed files
with
10 additions
and
0 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
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