mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Handle missing @ location in AtTypeAttrBase
Attributes like `nonisolated` aren't spelled with an `@`. I don't have a test case, but this would assert if the source range were queried.
This commit is contained in:
@@ -3841,7 +3841,9 @@ public:
|
||||
|
||||
SourceLoc getAtLoc() const { return AtLoc; }
|
||||
|
||||
SourceLoc getStartLocImpl() const { return AtLoc; }
|
||||
SourceLoc getStartLocImpl() const {
|
||||
return AtLoc.isValid() ? AtLoc : getAttrLoc();
|
||||
}
|
||||
SourceLoc getEndLocImpl() const { return getAttrLoc(); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user