Skip to content

[SYCL][NFC] Code cleanup revealed by self-build. #3153

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 5 commits into from
Feb 9, 2021

Conversation

zahiraam
Copy link
Contributor

@zahiraam zahiraam commented Feb 3, 2021

@@ -3477,7 +3481,6 @@ static const char *paramKind2Str(KernelParamKind K) {
CASE(std_layout);
CASE(sampler);
CASE(pointer);
default:
return "<ERROR>";
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the return "" statement be moved outside the switch block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Updated it. Thanks.

kbobrovs
kbobrovs previously approved these changes Feb 3, 2021
Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

BTW, I was wondering how to guard against forgetting to add a handling for a new enum value when it is added. Clang is consistent here and also issues an error in such case error: enumeration value 'green' not handled in switch [-Werror,-Wswitch] .

post-link approved

}
return "<ERROR>";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the clang-format error about indentation here. But otherwise, looks good.

@premanandrao
Copy link
Contributor

That switch-case macro change in SemaSYCL.cpp has now disappeared. Did you split that out?

@zahiraam
Copy link
Contributor Author

zahiraam commented Feb 4, 2021

That switch-case macro change in SemaSYCL.cpp has now disappeared. Did you split that out?

I had a conflict resolution and I have done it on this page! May be I should fix that in my ws.

	modified:   clang/lib/Sema/SemaSYCL.cpp
@zahiraam
Copy link
Contributor Author

zahiraam commented Feb 9, 2021

Can someone please review this? Thanks.

@bader bader requested a review from kbobrovs February 9, 2021 14:11
@elizabethandrews
Copy link
Contributor

LGTM but code owners @AlexeySachkov @kbobrovs needs to approve.

@premanandrao
Copy link
Contributor

Can someone please review this? Thanks.

Sorry @zahiraam, I missed getting back to this after the intermittent test failure issue.

@zahiraam
Copy link
Contributor Author

zahiraam commented Feb 9, 2021

Can someone please review this? Thanks.

Sorry @zahiraam, I missed getting back to this after the intermittent test failure issue.

No worries. I have more reviews coming and wanted this one to be merged in before. Thanks.

Copy link
Contributor

@v-klochkov v-klochkov left a comment

Choose a reason for hiding this comment

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

Minor comment: here and in future commits/PRs: please add '-s' option to 'git commit' command to add a signature the the commit message.

@bader
Copy link
Contributor

bader commented Feb 9, 2021

Minor comment: here and in future commits/PRs: please add '-s' option to 'git commit' command to add a signature the the commit message.

FYI: it's not required by https://github.com/intel/llvm/blob/sycl/CONTRIBUTING.md anymore.

@bader bader merged commit 5f2337f into intel:sycl Feb 9, 2021
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.

7 participants