Now that Clang and Swift emits source ranges for documentation comments the same, we need to remove the DocC workaround that offset Objective-C ranges, otherwise diagnostics for Objective-C documentation comments will appear on the wrong line.
Dependencies
None
Testing
Add some content that will result in warnings to an Objective-C documentation comment and build documentation for it. For example:
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Some description of my class
///
/// Can link to ``doSomething`` but not to ``NotFoundSymbol`` or <doc:NotFoundArticle>.
///
/// @Metadata {
/// @DisplayName("MyClass")
/// }
@interface MyClass : NSObject
/// Some description of some function
///
/// - Parameter something: This method has no parameters.
/// - Returns: This method doesn't return anything
- (void)doSomething;
@end
NS_ASSUME_NONNULL_END
The various warnings should display for the correct line and column ranges.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[x] Added tests
[x] Ran the ./bin/test script and it succeeded
[x] ~Updated documentation if necessary~ Not applicable
Bug/issue #, if applicable: rdar://129668876
Summary
Now that Clang and Swift emits source ranges for documentation comments the same, we need to remove the DocC workaround that offset Objective-C ranges, otherwise diagnostics for Objective-C documentation comments will appear on the wrong line.
Dependencies
None
Testing
Add some content that will result in warnings to an Objective-C documentation comment and build documentation for it. For example:
The various warnings should display for the correct line and column ranges.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded