[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 26 08:59:39 PDT 2024
Endilll wrote:
> New test compiles down to clang 3.0 (except warnings for https://cplusplus.github.io/CWG/issues/547.html) but do not compile before that because of the lack of `__is_const`/`__is_volatile` type traits.
>
> Function types with cv- qualifiers were added for Clang 2.5 in [22c40fa](https://github.com/llvm/llvm-project/commit/22c40fa28551f0da487f399a2fe0d3d25edf3edc), where they already used a different field to hold the qualifiers (thus the function types were not considered `const`/`volatile`/`__restrict` themselves), so it should be okay to claim this was implemented in Clang 2.5?
Thank you for the analysis! Typically you don't need to dig that deep. Based on https://godbolt.org/z/n6oPdMT91, I think `3.1` is the correct availability here, but I can be persuaded for `3.0`.
Clang 2.7 was the first one that by default provided C++ support without relying on GCC frontend, so I don't think it's meaningful to go further than that. (`Clang 2.6 (assertions)` on Compiler Explorer is patched to use internal C++ support, you can see for yourself how broken it was.)
https://github.com/llvm/llvm-project/pull/100747
More information about the cfe-commits
mailing list