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) [v6.32] #15753

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

hahnjo
Copy link
Member

@hahnjo hahnjo commented Jun 5, 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

(cherry picked from commit c767271, backport of #15437)

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

(cherry picked from commit c767271)
@hahnjo hahnjo self-assigned this Jun 5, 2024
@hahnjo hahnjo requested a review from vgvassilev as a code owner June 5, 2024 06:58
@hahnjo hahnjo changed the title [Clang] Implement CWG2518 - static_assert(false) [Clang] Implement CWG2518 - static_assert(false) [v6.32] Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

Test Results

    11 files      11 suites   2d 14h 0m 7s ⏱️
 2 632 tests  2 632 ✅ 0 💤 0 ❌
27 183 runs  27 183 ✅ 0 💤 0 ❌

Results for commit 225de3d.

@hahnjo hahnjo merged commit 2467b8d into root-project:v6-32-00-patches Jun 5, 2024
15 checks passed
@hahnjo hahnjo deleted the clang-cwg2518-v632 branch June 5, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants