diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-07 18:40:21 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-07 18:40:21 +0000 |
commit | 5cad82236ecc0a2eeed2edd75e119f6069a99f4c (patch) | |
tree | 6de61a6e283091ddc2403cf8040e007fb07fdc00 /lib/Sema/SemaType.cpp | |
parent | 8cacea57b6cd288f7578200e4884ab56bafc1a32 (diff) |
When applying ARC __weak to a non-objc pointer, do not give error that
__weak is unsupported by the deployment target, since it is going to be
ignored anyway.
Makes it easier for incremental migration from GC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 219a9e8a30..4dc6c949d5 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -3341,7 +3341,7 @@ static bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, // Forbid __weak if the runtime doesn't support it. if (lifetime == Qualifiers::OCL_Weak && - !S.getLangOptions().ObjCRuntimeHasWeak) { + !S.getLangOptions().ObjCRuntimeHasWeak && !NonObjCPointer) { // Actually, delay this until we know what we're parsing. if (S.DelayedDiagnostics.shouldDelayDiagnostics()) { |