summaryrefslogtreecommitdiff
path: root/test/SemaObjC/attr-objc-gc.m
Commit message (Collapse)AuthorAgeFilesLines
* Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall2015-10-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251041 91177308-0d34-0410-b5e6-96231b3b80d8
* err_attribute_not_string has been subsumed by err_attribute_argument_type.Aaron Ballman2013-07-301-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187400 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the attribute name to the err_attribute_wrong_number_arguments ↵Aaron Ballman2013-07-231-1/+1
| | | | | | | | diagnostic for clarity; updated almost all of the affected test cases. Thanks to Fariborz Jahanian for the suggestion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186980 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow GC qualifiers to be added/removed by conversions from/to void*John McCall2011-03-261-0/+11
| | | | | | | | without a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128328 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix my earlier commit to work with escaped newlines and leave breadcrumbsJohn McCall2011-03-081-0/+7
| | | | | | | | | in case we want to make a world where we can check intermediate instantiations for this kind of breadcrumb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
* objc_gc wants a pointer type, not a function type; give it a more appropriate John McCall2011-03-081-1/+5
| | | | | | | | | | diagnostic. Also, these attributes are commonly written with macros which we actually pre-define, so instead of expanding the macro location, refer to the instantiation location and name it using the macro loc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127219 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty up the wrong-number-of-arguments-for-attribute diagnostic byJohn McCall2011-03-021-1/+1
| | | | | | | | | using a custom plural form. Split out the range diagnostics as their own message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126840 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tests to use clang -cc1...Fariborz Jahanian2009-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91297 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | | Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
* rename testChris Lattner2009-02-141-0/+8
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64545 91177308-0d34-0410-b5e6-96231b3b80d8