Nullability annotations are implmented using attributes; previusly
clangd would skip over AttributedTypeLoc since their location
points to the attribute instead of the modified type.
Also add quite a few test cases for this.
Differential D89579
[clangd][ObjC] Support nullability annotations dgoldman on Oct 16 2020, 11:40 AM. Authored by
Details
Nullability annotations are implmented using attributes; previusly Also add quite a few test cases for this.
Diff Detail
Unit Tests Event Timeline
Comment Actions With that change, somehow this extract test is now failing, not sure why or if it's intended behavior (seems like it isn't)
Looks like the selection is off: Before:
After:
Comment Actions 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 for more general attribute support, and it has a generalization of the fix here. (It returns false for any node with an attribute attached). Comment Actions SGTM, the simplified cause is: R"cpp( [[int ^x = $C[[0]]^]]; )cpp" which you can add to TEST(SelectionTest, Selected) in SelectionTests.cpp. With a proper attribute fix (well type loc) I think to fix this selection issue above we'll need to change claimRange to take children into affect. |
clang-tidy: warning: 'auto *TL' can be declared as 'const auto *TL' [llvm-qualified-auto]
not useful