Skip to content

Basic: set the correct storage class for the alignment #21979

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
Jan 22, 2019

Conversation

compnerd
Copy link
Member

cl objects to the initialization of the templated type differing in storage
class due to the indication of constexpr. constexpr does not give the value
itself a const storage class. However, because the value is not initialized
inline, it does not like the constexpr attribute. Apply the constexpr only
on clang, and correct the storage to const.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

CC: @jrose-apple

@compnerd
Copy link
Member Author

@swift-ci please test

@jrose-apple
Copy link
Contributor

"If not MSVC", maybe? Which unfortunately is really "If not (MSVC and not Clang)".

@compnerd
Copy link
Member Author

compnerd commented Jan 18, 2019

Hmm, I could write that as #if !defined(_MSC_VER) || defined(__clang__) if you prefer?

@compnerd compnerd mentioned this pull request Jan 18, 2019
`cl` objects to the initialization of the templated type differing in storage
class due to the indication of `constexpr`.  `constexpr` does not give the value
itself a `const` storage class.  However, because the value is not initialized
inline, it does not like the `constexpr` attribute.  Apply the `constexpr` only
on clang, and correct the storage to `const`.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@jrose-apple - okay to merge?

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Yep, go ahead.

@compnerd compnerd merged commit f2f4cb8 into swiftlang:master Jan 22, 2019
@compnerd compnerd deleted the storage-class branch January 22, 2019 20:16
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.

2 participants