From d694e2490af8b2e92c79b2c1b543bcc4bb3981d1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 8 Dec 2022 13:16:29 -0500
Subject: [PATCH] Update the status of a few more C DRs
This includes tests for DR085 and DR259.
---
clang/test/C/drs/dr0xx.c | 3 +++
clang/test/C/drs/dr259.c | 21 +++++++++++++++++++++
clang/www/c_dr_status.html | 4 ++--
3 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 clang/test/C/drs/dr259.c
diff --git a/clang/test/C/drs/dr0xx.c b/clang/test/C/drs/dr0xx.c
index 942e83bef886..6a3717f0729b 100644
--- a/clang/test/C/drs/dr0xx.c
+++ b/clang/test/C/drs/dr0xx.c
@@ -70,6 +70,9 @@
* WG14 DR080: yes
* Merging of string constants
*
+ * WG14 DR085: yes
+ * Returning from main
+ *
* WG14 DR086: yes
* Object-like macros in system headers
*
diff --git a/clang/test/C/drs/dr259.c b/clang/test/C/drs/dr259.c
new file mode 100644
index 000000000000..0bd039e04bef
--- /dev/null
+++ b/clang/test/C/drs/dr259.c
@@ -0,0 +1,21 @@
+/* RUN: %clang_cc1 -std=c89 -E -verify %s | FileCheck %s
+ RUN: %clang_cc1 -std=c99 -E -verify %s | FileCheck %s
+ RUN: %clang_cc1 -std=c11 -E -verify %s | FileCheck %s
+ RUN: %clang_cc1 -std=c17 -E -verify %s | FileCheck %s
+ RUN: %clang_cc1 -std=c2x -E -verify %s | FileCheck %s
+ */
+
+/* expected-no-diagnostics */
+
+/* WG14 DR259: yes
+ * Macro invocations with no arguments
+ */
+#define m0() replacement
+#define m1(x) begin x end
+
+m0() m1()
+
+/*
+CHECK: replacement begin end
+*/
+
diff --git a/clang/www/c_dr_status.html b/clang/www/c_dr_status.html
index ea3859771736..15e92c5eb2cc 100644
--- a/clang/www/c_dr_status.html
+++ b/clang/www/c_dr_status.html
@@ -565,7 +565,7 @@ conformance.
85 |
C89 |
Returning from main |
- Unknown |
+ Yes |
86 |
@@ -1488,7 +1488,7 @@ conformance.
259 |
NAD |
Macro invocations with no arguments |
- Unknown |
+ Yes |
260 |