[PATCH] D89579: [clangd][ObjC] Support nullability annotations
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 07:10:26 PDT 2020
dgoldman added a comment.
In D89579#2341513 <https://reviews.llvm.org/D89579#2341513>, @sammccall wrote:
> Yep, let's revert to the previous state and land that, and I'll puzzle over the examples you give (because always returning false shouldn't affect behavior, just performance).
>
> I have put together D89785 <https://reviews.llvm.org/D89785> for more general attribute support, and it has a generalization of the fix here. (It returns `false` for any node with an attribute attached).
> But it's worth landing this first as it has good tests for the objc cases, and that patch has its own prerequisites and risks of regressions.
> (Not a timely coincidence, rather I got curious about the AST around Attrs after seeing this patch)
SGTM, the simplified cause is:
R"cpp( [[int ^x = $C[[0]]^]]; )cpp"
which you can add to `TEST(SelectionTest, Selected)` in SelectionTests.cpp <https://code.woboq.org/llvm/clang-tools-extra/clangd/unittests/SelectionTests.cpp.html#471>.
With a proper attribute fix I think to fix this selection issue above we'll need to change claimRange <https://code.woboq.org/llvm/clang-tools-extra/clangd/Selection.cpp.html#668> to take children into affect.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89579/new/
https://reviews.llvm.org/D89579
More information about the cfe-commits
mailing list