Skip to content
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

Fix unused variable/field warnings #78638

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
AST: Resolve an unused field warning in ClangImporter.cpp.
  • Loading branch information
tshortli committed Jan 14, 2025
commit 5d72e69b2e48cc23542539d8dc205e4e52425f12
8 changes: 3 additions & 5 deletions lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,16 @@ namespace {
};

class ParsingAction : public clang::ASTFrontendAction {
ASTContext &Ctx;
ClangImporter &Importer;
ClangImporter::Implementation &Impl;
const ClangImporterOptions &ImporterOpts;
std::string SwiftPCHHash;
public:
explicit ParsingAction(ASTContext &ctx,
ClangImporter &importer,
explicit ParsingAction(ClangImporter &importer,
ClangImporter::Implementation &impl,
const ClangImporterOptions &importerOpts,
std::string swiftPCHHash)
: Ctx(ctx), Importer(importer), Impl(impl), ImporterOpts(importerOpts),
: Importer(importer), Impl(impl), ImporterOpts(importerOpts),
SwiftPCHHash(swiftPCHHash) {}
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &CI, StringRef InFile) override {
Expand Down Expand Up @@ -1477,7 +1475,7 @@ ClangImporter::create(ASTContext &ctx,
}

// Create the associated action.
importer->Impl.Action.reset(new ParsingAction(ctx, *importer,
importer->Impl.Action.reset(new ParsingAction(*importer,
importer->Impl,
importerOpts,
swiftPCHHash));
Expand Down