[clang] 2c8b824 - [C2y] Claim conformance to WG14 N3478
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 7 05:32:05 PST 2025
Author: Aaron Ballman
Date: 2025-03-07T08:31:56-05:00
New Revision: 2c8b824ff562d4d0a6cd38310991425d03bc6f70
URL: https://github.com/llvm/llvm-project/commit/2c8b824ff562d4d0a6cd38310991425d03bc6f70
DIFF: https://github.com/llvm/llvm-project/commit/2c8b824ff562d4d0a6cd38310991425d03bc6f70.diff
LOG: [C2y] Claim conformance to WG14 N3478
This paper made it a constraint violation for a TU to end with an
unterminated multiline comment. This is something Clang has always
diagnosed as an error.
Added:
clang/test/C/C2y/n3478.c
Modified:
clang/www/c_status.html
Removed:
################################################################################
diff --git a/clang/test/C/C2y/n3478.c b/clang/test/C/C2y/n3478.c
new file mode 100644
index 0000000000000..9d1d8f97fa962
--- /dev/null
+++ b/clang/test/C/C2y/n3478.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -verify -std=c2y %s
+// RUN: %clang_cc1 -verify -std=c23 %s
+
+/* WG14 N3478: Yes
+ * Slay Some Earthly Demons XIII
+ *
+ * It was previously UB to end a source file with a partial preprocessing token
+ * or a partial comment. Clang has always diagnosed these.
+ */
+
+// expected-error at +1 {{unterminated /* comment}}
+/*
\ No newline at end of file
diff --git a/clang/www/c_status.html b/clang/www/c_status.html
index 4e912987b69c6..2f8b063f77b5d 100644
--- a/clang/www/c_status.html
+++ b/clang/www/c_status.html
@@ -299,7 +299,7 @@ <h2 id="c2y">C2y implementation status</h2>
<tr>
<td>Slay Some Earthly Demons XIII</td>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3478.pdf">N3478</a></td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr>
<td>Slay Some Earthly Demons XIV</td>
More information about the cfe-commits
mailing list