Skip to content

[NFC][SYCL] Avoid -Wreorder warning about order of initialization #3620

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
Apr 27, 2021

Conversation

premanandrao
Copy link
Contributor

@premanandrao premanandrao commented Apr 26, 2021

In the OptRecordFileRAII constructor, Ctx is initialized before OldDiagnosticHandler.
Change the order of declaration of these data members to avoid a -Wreorder warning.

Signed-off-by: Premanand M Rao [email protected]

@zahiraam
Copy link
Contributor

I hadn't noticed that warning. How did you get it?

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.

I'd rather keep the unique_ptr declarations together and change the order of the ctor initializers, but that's purely an aesthetic choice to keep like-types grouped together. WDYT?

@premanandrao
Copy link
Contributor Author

I'd rather keep the unique_ptr declarations together and change the order of the ctor initializers, but that's purely an aesthetic choice to keep like-types grouped together. WDYT?

I am okay with that too. This just was easier. :-)

@premanandrao
Copy link
Contributor Author

I hadn't noticed that warning. How did you get it?

Just a ninja build using the process here: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain

@AaronBallman
Copy link
Contributor

I hadn't noticed that warning. How did you get it?

Just a ninja build using the process here: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain

I'm a bit surprised that CI didn't pick up the additional warning before we committed it. Do we not do -Werror for CI?

@zahiraam
Copy link
Contributor

I hadn't noticed that warning. How did you get it?

Just a ninja build using the process here: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain

I'm a bit surprised that CI didn't pick up the additional warning before we committed it. Do we not do -Werror for CI?

MSVC didn't warn.

zahiraam
zahiraam previously approved these changes Apr 26, 2021
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!

@bader bader merged commit b52f203 into intel:sycl Apr 27, 2021
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Apr 27, 2021
* upstream/sycl:
  [NFC][SYCL] Avoid -Wreorder warning about order of initialization (intel#3620)
  [SYCL][DOC] Initial Draft of Extension for querying free device memory on Level Zero (intel#3468)
  [SYCL][PI][L0] Submit open command batch on event status query (intel#3612)
  [NFC] Fix the comment (intel#3613)
  Rename misleading attribute flag (intel#3610)
  [SYCL] Generate an opt report of kernel arguments.  (intel#3492)
  [SYCL] Support extra environment variables in LIT (intel#3598)
  [SYCL][Matrix] Make joint_matrix_mad return A*B+C's result instead of C=A*B+C (intel#3586)
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Apr 28, 2021
* upstream/sycl:
  [SYCL][Doc] Add group sorting algorithms extension specification (intel#3514)
  [Buildbot] Update Windows GPU driver to 27.20.100.9466 (intel#3594)
  [SYCL][NFC] Update tests for FPGA attributes (intel#3632)
  [CODEOWNERS] Add @kbobrovs back to few projects (intel#3638)
  [NFC] Update codeowners (intel#3619)
  [SYCL] Support 3-, 16-elements vectors in SG load/store (intel#3617)
  [SYCL-PTX] Fix libclc dependencies (intel#3624)
  [SYCL] Add sycl::span for SYCL2020 support (intel#3569)
  [NFC][SYCL] Avoid -Wreorder warning about order of initialization (intel#3620)
  [SYCL][DOC] Initial Draft of Extension for querying free device memory on Level Zero (intel#3468)
  [SYCL][PI][L0] Submit open command batch on event status query (intel#3612)
  [NFC] Fix the comment (intel#3613)
  Rename misleading attribute flag (intel#3610)
  [SYCL] Generate an opt report of kernel arguments.  (intel#3492)
  [SYCL] Support extra environment variables in LIT (intel#3598)
  [SYCL][Matrix] Make joint_matrix_mad return A*B+C's result instead of C=A*B+C (intel#3586)
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.

5 participants