diff options
author | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2024-02-14 16:39:00 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 16:39:00 +0400 |
commit | 502756905c7de5f6217a071b73adda72c46ffd1c (patch) | |
tree | cadfcc25cff3497c8556e8bcb136cbe617aaa467 /clang/lib/Sema/SemaDecl.cpp | |
parent | debca7ee43522e1702ade36f4954517e35f82886 (diff) | |
download | llvm-502756905c7de5f6217a071b73adda72c46ffd1c.zip llvm-502756905c7de5f6217a071b73adda72c46ffd1c.tar.gz llvm-502756905c7de5f6217a071b73adda72c46ffd1c.tar.bz2 |
[clang][NFC] Use "notable" for "interesting" identifiers in `IdentifierInfo` (#81542)
This patch expands notion of "interesting" in `IdentifierInto` it to
also cover ObjC keywords and builtins, which matches notion of
"interesting" in serialization layer. What was previously "interesting"
in `IdentifierInto` is now called "notable".
Beyond clearing confusion between serialization and the rest of the
compiler, it also resolved a naming problem: ObjC keywords, notable
identifiers, and builtin IDs are all stored in the same bit-field. Now
we can use "interesting" to name it and its corresponding type, instead
of `ObjCKeywordOrInterestingOrBuiltin` abomination.
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index e95e675..09a35fd 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6842,21 +6842,21 @@ Sema::ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *NewTD, if (IdentifierInfo *II = NewTD->getIdentifier()) if (!NewTD->isInvalidDecl() && NewTD->getDeclContext()->getRedeclContext()->isTranslationUnit()) { - switch (II->getInterestingIdentifierID()) { - case tok::InterestingIdentifierKind::FILE: + switch (II->getNotableIdentifierID()) { + case tok::NotableIdentifierKind::FILE: Context.setFILEDecl(NewTD); break; - case tok::InterestingIdentifierKind::jmp_buf: + case tok::NotableIdentifierKind::jmp_buf: Context.setjmp_bufDecl(NewTD); break; - case tok::InterestingIdentifierKind::sigjmp_buf: + case tok::NotableIdentifierKind::sigjmp_buf: Context.setsigjmp_bufDecl(NewTD); break; - case tok::InterestingIdentifierKind::ucontext_t: + case tok::NotableIdentifierKind::ucontext_t: Context.setucontext_tDecl(NewTD); break; - case tok::InterestingIdentifierKind::float_t: - case tok::InterestingIdentifierKind::double_t: + case tok::NotableIdentifierKind::float_t: + case tok::NotableIdentifierKind::double_t: NewTD->addAttr(AvailableOnlyInDefaultEvalMethodAttr::Create(Context)); break; default: |