mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Deprecation warnings for C-style for loops
Warns of deprecation, checks all the appropriate bits to see if we can do an automatic fix, and generates fix-its if that is valid. Also adds a note if the loop looks like it ought to be a simple for-each, but really isn’t because the loop var is modified inside the loop.
This commit is contained in:
@@ -800,6 +800,9 @@ public:
|
||||
|
||||
SourceLoc getStartLoc() const { return getLabelLocOrKeywordLoc(ForLoc); }
|
||||
SourceLoc getEndLoc() const { return Body->getEndLoc(); }
|
||||
|
||||
SourceLoc getFirstSemicolonLoc() const { return Semi1Loc; }
|
||||
SourceLoc getSecondSemicolonLoc() const { return Semi2Loc; }
|
||||
|
||||
NullablePtr<Expr> getInitializer() const { return Initializer; }
|
||||
void setInitializer(Expr *V) { Initializer = V; }
|
||||
|
||||
Reference in New Issue
Block a user