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

Conversation

pvchupin
Copy link
Contributor

@pvchupin pvchupin commented May 3, 2021

.../llvm/clang/lib/Sema/SemaSYCL.cpp(4662,10):
error: moving a local object in a return statement prevents copy elision
[-Werror,-Wpessimizing-move]
return std::move(NewShimName);
^
.../llvm/clang/lib/Sema/SemaSYCL.cpp(4662,10):
note: remove std::move call here
return std::move(NewShimName);
^~~~~~~~~~ ~

Signed-off-by: Pavel V Chupin [email protected]

.../llvm/clang/lib/Sema/SemaSYCL.cpp(4662,10):
error: moving a local object in a return statement prevents copy elision
[-Werror,-Wpessimizing-move]
  return std::move(NewShimName);
         ^
.../llvm/clang/lib/Sema/SemaSYCL.cpp(4662,10):
note: remove std::move call here
  return std::move(NewShimName);
         ^~~~~~~~~~           ~

Signed-off-by: Pavel V Chupin <[email protected]>
Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM!

@pvchupin pvchupin merged commit 7f6da43 into intel:sycl May 3, 2021
@pvchupin pvchupin deleted the fix-warnings branch August 24, 2021 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.

3 participants