root icon indicating copy to clipboard operation
root copied to clipboard

[Clang] Implement CWG2518 - static_assert(false)

Open hahnjo opened this issue 1 year ago • 2 comments
trafficstars

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 https://github.com/root-project/root/issues/15321

hahnjo avatar May 07 '24 12:05 hahnjo

Test Results

    11 files      11 suites   2d 13h 44m 43s :stopwatch:  2 645 tests  2 645 :white_check_mark: 0 :zzz: 0 :x: 27 455 runs  27 455 :white_check_mark: 0 :zzz: 0 :x:

Results for commit b6f480eb.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 07 '24 15:05 github-actions[bot]

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

StephanTLavavej avatar May 09 '24 10:05 StephanTLavavej