[PATCH] D108556: [clangd] Don't highlight ObjC `id` and `instancetype`
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 6 02:11:02 PDT 2021
kadircet added a comment.
thanks, this looks great! just a question about the extra handling
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:100
+ // Even though ObjC `id` and `instancetype` are *implemented* via typedefs, we
+ // don't want to treat them like typedefs - instead let the editor treat
+ // them like keywords.
----------------
i think comment needs updating. rather than mentioning the editor, can we just talk about "these should be treated as keywords rather than decls" ?
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:188
if (const TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(D)) {
+ if (shouldSkipTypedef(TND))
+ return;
----------------
why do we need this despite bailing out in the visitor?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108556/new/
https://reviews.llvm.org/D108556
More information about the cfe-commits
mailing list