[clang] Add test for CWG3129#206335
Conversation
|
@llvm/pr-subscribers-clang Author: Jan Schultke (eisenwave) ChangesClang has always supported floating-point literals with overly tiny or huge exponents, with only a warning emitted. Full diff: https://github.com/llvm/llvm-project/pull/206335.diff 1 Files Affected:
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index ef30b5eefea13..4eaf0c44ab082 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -21720,7 +21720,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td>[<a href="https://wg21.link/lex.fcon">lex.fcon</a>]</td>
<td>DR</td>
<td>Clarify which <I>floating-point-literal</I>s are valid</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Clang 2.7</td>
</tr>
<tr id="3130">
<td><a href="https://cplusplus.github.io/CWG/issues/3130.html">3130</a></td>
|
There was a problem hiding this comment.
Sorry, a bit more work is needed here.
- You need to add tests to
clang/test/CXX/drs/cwg31xx.cpp. - You need to take your tests to Compiler Explorer to see what was the first Clang release that exhibited the expected behavior (call it R).
- You need to leave a special comment in the test specifying R.
- You need to run
clang/www/make_cxx_dr_statusto update thecxx_dr_status.html. If it produces more changes, include only the changes relevant for CWG3129. If the script terminates with an error about an unrelated Core issue, let me know, and I'll fix that.
|
The PR description would also benefit from a link to CWG3129. |
I've tried that, and I couldn't find a version old enough where it wouldn't do what the issue wants. My impression is that 2.7 is being used to mean "since forever" in these issue resolutions, Hmm nevermind, 2.7 doesn't accept it, so 3.0 is actually the fix verison https://godbolt.org/z/zW3c8r6eP |
|
The one problem with putting it into Maybe that means it should have been in a separate file after all, or is there some clever way to keep the comment? |
Endilll
left a comment
There was a problem hiding this comment.
The one problem with putting it into cwg31xx.cpp is that I had to get rid of the // cxx98-14-no-diagnostics comment; otherwise this test just wouldn't pass.
This is totally fine. Special needs I mentioned before are scoped to RUN lines.
You should change the title of the PR to something along the lines of "Add test for CWG3129".
Let me know when it's ready to be merged.
|
OH wait, we got some CI failures. |
|
Very weird. The CI failures is because it's printing as the maximum for which did work for me locally. OH well ... |
|
@Endilll should be good to merge now. |
Resolves https://wg21.link/CWG3129
Clang has supported floating-point literals with overly tiny or huge exponents since 3.0, with only a warning emitted.