diff --git a/clang-tools-extra/clangd/Selection.cpp b/clang-tools-extra/clangd/Selection.cpp --- a/clang-tools-extra/clangd/Selection.cpp +++ b/clang-tools-extra/clangd/Selection.cpp @@ -619,7 +619,8 @@ // AttributeTypeLoc points to the attribute's range, NOT the modified // type's range. if (auto AT = TL->getAs()) - S = AT.getModifiedLoc().getSourceRange(); + S = AT.getModifiedLoc() + .getSourceRange(); // should we just return false? } if (!SelChecker.mayHit(S)) { dlog("{1}skip: {0}", printNodeToString(N, PrintPolicy), indent()); diff --git a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp --- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp @@ -827,8 +827,7 @@ @property(retain) [[MYObject]] *x; @end )cpp"; - EXPECT_DECLS("ObjCInterfaceTypeLoc", - "@interface MYObject"); + EXPECT_DECLS("ObjCInterfaceTypeLoc", "@interface MYObject"); Code = R"cpp( @interface MYObject2 @@ -837,8 +836,7 @@ @property(retain, nonnull) [[MYObject2]] *x; @end )cpp"; - EXPECT_DECLS("ObjCInterfaceTypeLoc", - "@interface MYObject2"); + EXPECT_DECLS("ObjCInterfaceTypeLoc", "@interface MYObject2"); Code = R"cpp( @protocol Foo diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp --- a/clang-tools-extra/clangd/unittests/HoverTests.cpp +++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp @@ -2005,8 +2005,8 @@ HI.NamespaceScope = ""; HI.Definition = "@interface MYObject\n@end"; }}, + // Should work even with nullability attribute. { - // Should work even with nullability attribute. R"cpp( @interface MYObject @end