[PATCH] D104117: [clangd] Fix highlighting for implicit ObjC property refs
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 22 23:14:38 PDT 2021
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:579
+ return true;
+ // A single property expr can reference both a getter and setter, but we can
+ // only provide a single semantic token, so prefer the getter.
----------------
is there any difference to using one or the other ? (i.e. can setter be static while getter isn't? I suppose not). maybe mention that in the comment and say that we are choosing whichever exists (and change the logic below to `if` followed by an `else if`?
================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:699
@property(nonatomic, assign) int $Field_decl[[someProperty]];
+ @property(readonly, class) $Class[[Foo]] *$Field_decl_readonly_static[[sharedInstance]];
@end
----------------
we have an explicit `@property` here, but comments in the implementation says otherwise. did you mean not having any explicit `getter/setter` or `@synthesize` statement ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104117/new/
https://reviews.llvm.org/D104117
More information about the cfe-commits
mailing list