llvm-project/clang/test
John McCall 460ce58fa6 Define weak and __weak to mean ARC-style weak references, even in MRC.
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

llvm-svn: 251041
2015-10-22 18:38:17 +00:00
..
ARCMT Define weak and __weak to mean ARC-style weak references, even in MRC. 2015-10-22 18:38:17 +00:00
ASTMerge Update tests touched by r249656 2015-10-08 06:31:22 +00:00
Analysis Attempt to fix build bot test failures. 2015-10-22 13:23:18 +00:00
CXX [Concepts] Fixing Concepts TS directory structure; NFC 2015-10-10 02:17:39 +00:00
CodeCompletion [Tests] Modified Lit Tests to be C++11 compatibile 2015-08-27 18:49:15 +00:00
CodeGen Disable trigraph and escaped newline expansion on all types of raw string literals not just ASCII type. 2015-10-22 15:35:21 +00:00
CodeGenCUDA [CUDA] __global__ functions should always be visible externally. 2015-09-23 17:44:53 +00:00
CodeGenCXX [MS ABI] Mangle static anonymous unions 2015-10-22 07:15:56 +00:00
CodeGenObjC Define weak and __weak to mean ARC-style weak references, even in MRC. 2015-10-22 18:38:17 +00:00
CodeGenObjCXX Fix and stylize the emission of GC/ARC ivar and GC block layout strings. 2015-10-21 18:06:47 +00:00
CodeGenOpenCL [OpenCL] Fix casting a true boolean to an integer vector. 2015-10-05 11:27:41 +00:00
Coverage Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
CoverageMapping InstrProf: Fix a misuse of the FunctionDecl API when generating coverage 2015-07-28 00:41:51 +00:00
Driver MemorySanitizer does not require PIE. 2015-10-21 21:28:49 +00:00
FixIt Update tests touched by r249656 2015-10-08 06:31:22 +00:00
Format clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00
Frontend Add back null check removed accidentally in r250554 2015-10-20 18:45:57 +00:00
Headers Make ms-intrin.cpp test require the x86 target. 2015-09-23 00:24:34 +00:00
Index Define weak and __weak to mean ARC-style weak references, even in MRC. 2015-10-22 18:38:17 +00:00
Integration
Layout [MS ABI] Don't crash when inheriting from base with trailing empty array member 2015-10-22 18:04:22 +00:00
Lexer [coroutines] Add forgotten test for lexing coroutines keywords. 2015-10-22 05:21:12 +00:00
Misc Recommit "Clang support for -flto=thin." 2015-10-15 20:35:53 +00:00
Modules [modules] libstdc++ defines some static inline functions in its internal 2015-10-21 07:13:52 +00:00
OpenMP [OPENMP] Fix for http://llvm.org/PR25221: Infinite loop while parsing OpenMP directive 2015-10-19 06:40:17 +00:00
PCH Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
Parser [coroutines] Add overloaded unary 'operator co_await'. 2015-10-22 05:12:22 +00:00
Preprocessor Fix __ARM_FP value for sp-only FPUs with Half-precision 2015-10-21 10:03:55 +00:00
Profile Tweak a couple of -fprofile tests in clang/test to accept backslash in path. 2015-07-10 13:11:08 +00:00
Rewriter Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
Sema [Sema] Fix address-of + enable_if overloading logic 2015-10-16 01:17:38 +00:00
SemaCUDA [CUDA] Allow parsing of host and device code simultaneously. 2015-09-22 17:23:22 +00:00
SemaCXX [coroutines] Initial stub Sema functionality for handling coroutine await / yield / return. 2015-10-22 06:13:50 +00:00
SemaObjC Define weak and __weak to mean ARC-style weak references, even in MRC. 2015-10-22 18:38:17 +00:00
SemaObjCXX Some minor ARC diagnostic improvements. 2015-10-21 18:06:38 +00:00
SemaOpenCL [OpenCL] Add test for program scope variable restrictions in OpenCL v2.0 2015-10-21 10:37:57 +00:00
SemaTemplate Re-land r250592 without rejecting field refs in unevaluated contexts 2015-10-20 21:04:13 +00:00
TableGen
Tooling Change the expectation for test/Tooling/ms-asm-no-target.cpp since 2015-07-08 01:39:38 +00:00
Unit
VFS Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
.clang-format
CMakeLists.txt [CMake] Reformat CLANG_TEST_DEPS. 2015-10-16 09:38:42 +00:00
Makefile
TestRunner.sh
cxx-sections.data
lit.cfg Revert r247977, "clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as "non-clang-driver"." 2015-10-20 22:36:16 +00:00
lit.site.cfg.in
make_test_dirs.pl