Skip to content
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

[Clang] Implement CWG2518 - static_assert(false) #15437

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

hahnjo
Copy link
Member

@hahnjo hahnjo commented May 7, 2024

This allows static_assert(false) to not be ill-formed in template definitions.

This change is applied as a DR in all C++ modes.

Of notes, a couple of tests were relying of the eager nature of static_assert

  • test/SemaTemplate/instantiation-dependence.cpp
  • test/SemaTemplate/instantiate-var-template.cpp

I don't know if the changes to static_assert
still allow that sort of tests to be expressed.

Reviewed By: #clang-language-wg, erichkeane, aaron.ballman

Differential Revision: https://reviews.llvm.org/D144285


Fixes the build with newer versions of MSVC's STL, reported as #15321

Copy link

github-actions bot commented May 7, 2024

Test Results

    11 files      11 suites   2d 13h 44m 43s ⏱️
 2 645 tests  2 645 ✅ 0 💤 0 ❌
27 455 runs  27 455 ✅ 0 💤 0 ❌

Results for commit b6f480e.

♻️ This comment has been updated with latest results.

@StephanTLavavej
Copy link

We've verified that your patch fixes Root with our in-development compiler and STL, thanks!

Copy link
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

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

Following the confirmation from @StephanTLavavej that this PR fixes the issue

This allows `static_assert(false)` to not be ill-formed
in template definitions.

This change is applied as a DR in all C++ modes.

Of notes, a couple of tests were relying of the eager nature
of static_assert

* test/SemaTemplate/instantiation-dependence.cpp
* test/SemaTemplate/instantiate-var-template.cpp

I don't know if the changes to `static_assert`
still allow that sort of tests to be expressed.

Reviewed By: #clang-language-wg, erichkeane, aaron.ballman

Differential Revision: https://reviews.llvm.org/D144285

---

Fixes the build with newer versions of MSVC's STL, reported as
root-project#15321
@hahnjo hahnjo marked this pull request as ready for review June 4, 2024 13:56
@hahnjo hahnjo merged commit c767271 into root-project:master Jun 5, 2024
15 checks passed
@hahnjo hahnjo deleted the clang-cwg2518 branch June 5, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants