[all-commits] [llvm/llvm-project] c47f97: [Sema][SVE] Don't allow sizeless objects to be thrown
rsandifo-arm via All-commits
all-commits at lists.llvm.org
Tue Mar 17 04:53:03 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c47f971694be0159ffddfee8a75ae515eba91439
https://github.com/llvm/llvm-project/commit/c47f971694be0159ffddfee8a75ae515eba91439
Author: Richard Sandiford <richard.sandiford at arm.com>
Date: 2020-03-17 (Tue, 17 Mar 2020)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaExprCXX.cpp
M clang/test/SemaCXX/sizeless-1.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list