Skip to content

Fix warning on build with clang based compiler #3680

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 1 commit into from
May 3, 2021
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
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4624,7 +4624,7 @@ static std::string EmitSpecIdShim(raw_ostream &OS, unsigned &ShimCounter,
PrintNSClosingBraces(OS, Decl::castToDeclContext(AnonNS));

++ShimCounter;
return std::move(NewShimName);
return NewShimName;
}

// Emit the list of shims required for a DeclContext, calls itself recursively.
Expand Down Expand Up @@ -4670,7 +4670,7 @@ static std::string EmitSpecIdShims(raw_ostream &OS, unsigned &ShimCounter,
"Function assumes this is in an anonymous namespace");
std::string RelativeName = VD->getNameAsString();
EmitSpecIdShims(OS, ShimCounter, VD->getDeclContext(), RelativeName);
return std::move(RelativeName);
return RelativeName;
}

bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
Expand Down