diff options
author | Douglas Gregor <dgregor@apple.com> | 2015-07-07 03:58:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2015-07-07 03:58:42 +0000 |
commit | ffad82b290ed4622bce0e221f8525eced89db528 (patch) | |
tree | abf0fab179eb5654928e0333e5785253793b3c89 /lib/Basic/IdentifierTable.cpp | |
parent | 746c7a1520e1bfb96e55ce474f2f2d1dc87c43df (diff) | |
download | clang-ffad82b290ed4622bce0e221f8525eced89db528.tar.gz |
Implement the Objective-C __kindof type qualifier.
The __kindof type qualifier can be applied to Objective-C object
(pointer) types to indicate id-like behavior, which includes implicit
"downcasting" of __kindof types to subclasses and id-like message-send
behavior. __kindof types provide better type bounds for substitutions
into unspecified generic types, which preserves more type information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241548 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 36fba994f1..dcb7603bf5 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -109,7 +109,8 @@ namespace { WCHARSUPPORT = 0x04000, HALFSUPPORT = 0x08000, KEYCONCEPTS = 0x10000, - KEYALL = (0x1ffff & ~KEYNOMS18 & + KEYOBJC2 = 0x20000, + KEYALL = (0x3ffff & ~KEYNOMS18 & ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude. }; @@ -144,6 +145,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, // in non-arc mode. if (LangOpts.ObjC2 && (Flags & KEYARC)) return KS_Enabled; if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; + if (LangOpts.ObjC2 && (Flags & KEYOBJC2)) return KS_Enabled; if (LangOpts.CPlusPlus && (Flags & KEYCXX11)) return KS_Future; return KS_Disabled; } |