diff options
author | John McCall <rjmccall@apple.com> | 2012-03-30 05:23:48 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-03-30 05:23:48 +0000 |
commit | 100c6491c99e92f6b6e9551d0b0cfe3d65eb306b (patch) | |
tree | c7d29f068f59880c7b0991d83969071d71776189 /include/clang/Basic | |
parent | 5629646711d9c748feb1043a7df2d5ca7d1bdfc4 (diff) |
Forbid the block and lambda copy-capture of __autoreleasing variables
in ARC, under the usual reasoning limiting the use of __autoreleasing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 9dd04b99d5..30780104d6 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3270,6 +3270,9 @@ def warn_err_new_delete_object_array : Warning< def err_arc_autoreleasing_var : Error< "%select{__block variables|global variables|fields|ivars}0 cannot have " "__autoreleasing ownership">; +def err_arc_autoreleasing_capture : Error< + "cannot capture __autoreleasing variable in a " + "%select{block|lambda by copy}0">; def err_arc_thread_ownership : Error< "thread-local variable has non-trivial ownership: type is %0">; def err_arc_indirect_no_ownership : Error< |