Skip to content

Remove two pImpl abstraction layers in rename #69783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 10, 2023

IMO the code is a lot easier to read if we don’t hide the implementation in an Implementation class. AFAICT the abstraction layer wasn’t giving us anything.

@ahoppen
Copy link
Member Author

ahoppen commented Nov 10, 2023

@swift-ci Please smoke test

@@ -24,12 +24,13 @@
#include "swift/AST/DiagnosticConsumer.h"
#include "swift/AST/PluginRegistry.h"
#include "swift/Basic/ThreadSafeRefCounted.h"
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be an example of why it can be useful, though it probably doesn't really matter in this case (ie. the header is really only needed in the implementation, but now slows down everything including SwiftLangSupport.h)

@@ -100,13 +100,11 @@ class FindRenameRangesConsumer {
};

class FindRenameRangesAnnotatingConsumer : public FindRenameRangesConsumer {
struct Implementation;
Implementation &Impl;
std::unique_ptr<SourceEditConsumer> pRewriter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize you just moved this out, but... odd name.

@ahoppen
Copy link
Member Author

ahoppen commented Nov 13, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit b598baf into swiftlang:main Nov 13, 2023
@ahoppen ahoppen deleted the ahoppen/rename-cleanup-1 branch November 13, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants