diff options
author | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2025-04-30 06:19:06 +0300 |
---|---|---|
committer | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2025-04-30 06:19:33 +0300 |
commit | 23c3c4e40304f7c05fd77e45d26c846779b37ed5 (patch) | |
tree | 30ee6f0de7dd6f91bd52f5e99d4a5c2d3dde2ca5 /clang/lib/Parse/Parser.cpp | |
parent | 44d8aa8139e02e7b1642f284b32757ee446a88e6 (diff) | |
download | llvm-23c3c4e40304f7c05fd77e45d26c846779b37ed5.zip llvm-23c3c4e40304f7c05fd77e45d26c846779b37ed5.tar.gz llvm-23c3c4e40304f7c05fd77e45d26c846779b37ed5.tar.bz2 |
[clang][NFC] Convert `Parser::ObjCTypeQual` to scoped enum
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index e127bcc..44d33a7 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -512,16 +512,24 @@ void Parser::Initialize() { // Initialization for Objective-C context sensitive keywords recognition. // Referenced in Parser::ParseObjCTypeQualifierList. if (getLangOpts().ObjC) { - ObjCTypeQuals[objc_in] = &PP.getIdentifierTable().get("in"); - ObjCTypeQuals[objc_out] = &PP.getIdentifierTable().get("out"); - ObjCTypeQuals[objc_inout] = &PP.getIdentifierTable().get("inout"); - ObjCTypeQuals[objc_oneway] = &PP.getIdentifierTable().get("oneway"); - ObjCTypeQuals[objc_bycopy] = &PP.getIdentifierTable().get("bycopy"); - ObjCTypeQuals[objc_byref] = &PP.getIdentifierTable().get("byref"); - ObjCTypeQuals[objc_nonnull] = &PP.getIdentifierTable().get("nonnull"); - ObjCTypeQuals[objc_nullable] = &PP.getIdentifierTable().get("nullable"); - ObjCTypeQuals[objc_null_unspecified] - = &PP.getIdentifierTable().get("null_unspecified"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::in)] = + &PP.getIdentifierTable().get("in"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::out)] = + &PP.getIdentifierTable().get("out"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::inout)] = + &PP.getIdentifierTable().get("inout"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::oneway)] = + &PP.getIdentifierTable().get("oneway"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::bycopy)] = + &PP.getIdentifierTable().get("bycopy"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::byref)] = + &PP.getIdentifierTable().get("byref"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::nonnull)] = + &PP.getIdentifierTable().get("nonnull"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::nullable)] = + &PP.getIdentifierTable().get("nullable"); + ObjCTypeQuals[llvm::to_underlying(ObjCTypeQual::null_unspecified)] = + &PP.getIdentifierTable().get("null_unspecified"); } Ident_instancetype = nullptr; |