Skip to content
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions cpp2rust/converter/converter_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ GetUserDefinedDefaultConstructor(const clang::CXXRecordDecl *decl) {

std::string GetMainFileName(const clang::ASTContext &ctx) {
const auto &src_mgr = ctx.getSourceManager();
auto filed_id = src_mgr.getMainFileID();
auto file_entry = src_mgr.getFileEntryRefForID(filed_id);
auto file_id = src_mgr.getMainFileID();
auto file_entry = src_mgr.getFileEntryRefForID(file_id);
auto file_path = file_entry->getName();
auto file_name = llvm::sys::path::filename(file_path);
return llvm::sys::path::stem(file_name).str();
Expand Down Expand Up @@ -399,7 +399,7 @@ std::string GetNamedDeclAsString(const clang::NamedDecl *decl) {
}
}

if (name.size() == 0) {
if (name.empty()) {
name = "self";
}

Expand Down
Loading