From: Erik Pilkington Date: Tue, 30 Oct 2018 20:51:28 +0000 (+0000) Subject: NFC: Merge KEYOBJC and KEYARC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c47c49c07b212bd587b39e8aa7b47f3b84ab033c;p=clang NFC: Merge KEYOBJC and KEYARC We used to only define ARC keywords in -fobjc-arc mode, but now that we define them in ObjC mode, there isn't any reason to keep them seperate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345646 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index 7db033ade5..e4616c9a6a 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -576,10 +576,10 @@ ALIAS("__fp16", half , KEYALL) KEYWORD(half , HALFSUPPORT) // Objective-C ARC keywords. -KEYWORD(__bridge , KEYARC) -KEYWORD(__bridge_transfer , KEYARC) -KEYWORD(__bridge_retained , KEYARC) -KEYWORD(__bridge_retain , KEYARC) +KEYWORD(__bridge , KEYOBJC) +KEYWORD(__bridge_transfer , KEYOBJC) +KEYWORD(__bridge_retained , KEYOBJC) +KEYWORD(__bridge_retain , KEYOBJC) // Objective-C keywords. KEYWORD(__covariant , KEYOBJC) diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index d42b80f9e7..a584849906 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -99,30 +99,29 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts, namespace { enum { - KEYC99 = 0x1, - KEYCXX = 0x2, - KEYCXX11 = 0x4, - KEYGNU = 0x8, - KEYMS = 0x10, - BOOLSUPPORT = 0x20, - KEYALTIVEC = 0x40, - KEYNOCXX = 0x80, - KEYBORLAND = 0x100, - KEYOPENCLC = 0x200, - KEYC11 = 0x400, - KEYARC = 0x800, - KEYNOMS18 = 0x01000, - KEYNOOPENCL = 0x02000, - WCHARSUPPORT = 0x04000, - HALFSUPPORT = 0x08000, - CHAR8SUPPORT = 0x10000, - KEYCONCEPTS = 0x20000, - KEYOBJC = 0x40000, - KEYZVECTOR = 0x80000, - KEYCOROUTINES = 0x100000, - KEYMODULES = 0x200000, - KEYCXX2A = 0x400000, - KEYOPENCLCXX = 0x800000, + KEYC99 = 0x1, + KEYCXX = 0x2, + KEYCXX11 = 0x4, + KEYGNU = 0x8, + KEYMS = 0x10, + BOOLSUPPORT = 0x20, + KEYALTIVEC = 0x40, + KEYNOCXX = 0x80, + KEYBORLAND = 0x100, + KEYOPENCLC = 0x200, + KEYC11 = 0x400, + KEYNOMS18 = 0x800, + KEYNOOPENCL = 0x1000, + WCHARSUPPORT = 0x2000, + HALFSUPPORT = 0x4000, + CHAR8SUPPORT = 0x8000, + KEYCONCEPTS = 0x10000, + KEYOBJC = 0x20000, + KEYZVECTOR = 0x40000, + KEYCOROUTINES = 0x80000, + KEYMODULES = 0x100000, + KEYCXX2A = 0x200000, + KEYOPENCLCXX = 0x400000, KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX2A, KEYALL = (0xffffff & ~KEYNOMS18 & ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude. @@ -163,7 +162,6 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, if (LangOpts.C11 && (Flags & KEYC11)) return KS_Enabled; // We treat bridge casts as objective-C keywords so we can warn on them // in non-arc mode. - if (LangOpts.ObjC && (Flags & KEYARC)) return KS_Enabled; if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled; if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; if (LangOpts.CoroutinesTS && (Flags & KEYCOROUTINES)) return KS_Enabled;