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 | ab209d83be5dadff4f17364a71f323b89e3c63f8 (patch) | |
tree | 5e97315685c9476095deef062e53e98e525d78e5 /clang/lib/Basic/IdentifierTable.cpp | |
parent | 10dc9d80cbb47675be0c6ea8481e12ec197e1637 (diff) | |
download | bcm5719-llvm-ab209d83be5dadff4f17364a71f323b89e3c63f8.tar.gz bcm5719-llvm-ab209d83be5dadff4f17364a71f323b89e3c63f8.zip |
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.
llvm-svn: 241548
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 36fba994f1e..dcb7603bf5a 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/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; } |