diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-19 21:06:15 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-19 21:06:15 +0000 |
commit | 00852e41261f9860233d3b407fce0506346cdacb (patch) | |
tree | 653abf951d364f773b23c80fb57e66e60e55795d /lib/Basic/IdentifierTable.cpp | |
parent | 21cf08b7e0c03266f37f436c2afd8521c643b31a (diff) |
objc-arc: bridge casts in non-objc-arc mode are ignord.
But, warn too. // rdar://10597832
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index 94ca1789f3..f5b417c72c 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -125,7 +125,9 @@ static void AddKeyword(StringRef Keyword, else if (LangOpts.OpenCL && (Flags & KEYOPENCL)) AddResult = 2; else if (!LangOpts.CPlusPlus && (Flags & KEYNOCXX)) AddResult = 2; else if (LangOpts.C1X && (Flags & KEYC1X)) AddResult = 2; - else if (LangOpts.ObjCAutoRefCount && (Flags & KEYARC)) AddResult = 2; + // We treat bridge casts as objective-C keywords so we can warn on them + // in non-arc mode. + else if (LangOpts.ObjC2 && (Flags & KEYARC)) AddResult = 2; else if (LangOpts.CPlusPlus && (Flags & KEYCXX0X)) AddResult = 3; // Don't add this keyword if disabled in this language. |