]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(c,cpp): Add reference links to noreturn tests
authorDoug Kearns <dougkearns@gmail.com>
Fri, 16 Jan 2026 13:27:24 +0000 (13:27 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 16 Jan 2026 13:27:24 +0000 (13:27 +0000)
Add links to the example page at cppreference.com used for these tests
as per their licensing requirements.

closes: #19192

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/testdir/dumps/c_noreturn_00.dump
runtime/syntax/testdir/dumps/c_noreturn_01.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/cpp_noreturn_00.dump
runtime/syntax/testdir/dumps/cpp_noreturn_01.dump [new file with mode: 0644]
runtime/syntax/testdir/input/c_noreturn.c
runtime/syntax/testdir/input/cpp_noreturn.cpp

index 7bb73809b90e00cd86f1fa7e31f06c32fc98f3f6..dd155b74934c587125f745a9252d5abb8f7d23f5 100644 (file)
@@ -1,4 +1,9 @@
->#+0#e000e06#ffffff0|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56
+>/+0#0000e05#ffffff0@1| |C| |f|u|n|c|t|i|o|n|s| |-| |_|N|o|r|e|t|u|r|n| |f|u|n|c|t|i|o|n| |s|p|e|c|i|f|i|e|r| |(|s|i|n|c|e| |C|1@1|)|(|d|e|p|r|e|c|a|t|e|d| |i|n| |C|2|3
+|)| +0#0000000&@73
+@75
+|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|n|o|r|e|t|u|r|n|.|h|t|m|l| +0#0000000&@9
+@75
+|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56
 |#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|l|i|b|.|h|>| +0#0000000&@55
 |#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|n|o|r|e|t|u|r|n|.|h|>| +0#0000000&@50
 @75
@@ -12,9 +17,4 @@
 @75
 |i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60
 |{| @73
-@4|p|u|t|s|(|"+0#e000002&|P|r|e|p|a|r|i|n|g| |t|o| |e|x|i|t|.@2|"|)+0#0000000&|;| @41
-@4|e|x|i|t|_|n|o|w|(|2+0#e000002&|)+0#0000000&|;| @58
-@4|p|u|t|s|(|"+0#e000002&|T|h|i|s| |c|o|d|e| |i|s| |n|e|v|e|r| |e|x|e|c|u|t|e|d|.|"|)+0#0000000&|;| @33
-|}| @73
-|~+0#4040ff13&| @73
-| +0#0000000&@56|1|,|1| @10|A|l@1| 
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/c_noreturn_01.dump b/runtime/syntax/testdir/dumps/c_noreturn_01.dump
new file mode 100644 (file)
index 0000000..22e091e
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|i+0#af5f00255&|f| +0#0000000&|(|i| |>| |0+0#e000002&|)+0#0000000&| @60
+@8|e|x|i|t|(|i|)|;| @58
+|}| @73
+@75
+|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60
+>{| @73
+@4|p|u|t|s|(|"+0#e000002&|P|r|e|p|a|r|i|n|g| |t|o| |e|x|i|t|.@2|"|)+0#0000000&|;| @41
+@4|e|x|i|t|_|n|o|w|(|2+0#e000002&|)+0#0000000&|;| @58
+@4|p|u|t|s|(|"+0#e000002&|T|h|i|s| |c|o|d|e| |i|s| |n|e|v|e|r| |e|x|e|c|u|t|e|d|.|"|)+0#0000000&|;| @33
+|}| @73
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|8|,|1| @9|B|o|t| 
index e2cfd2589776a3d3154ea242f9042820e95b25b1..2386ad118f7c917f4d57c1a5cc46e5190d15be57 100644 (file)
@@ -1,4 +1,9 @@
->#+0#e000e06#ffffff0|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56
+>/+0#0000e05#ffffff0@1| |C|+@1| |a|t@1|r|i|b|u|t|e|s| |-| |n|o|r|e|t|u|r|n| |(|s|i|n|c|e| |C|+@1|1@1|)| +0#0000000&@32
+@75
+|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|n|o|r|e|t|u|r|n|.|h|t|m|l| |[|m|o|d|i|f|i|e|d
+| |b|y| |V|i|m| |P|r|o|j|e|c|t|]| +0#0000000&@58
+@75
+|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56
 |#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|l|i|b|.|h|>| +0#0000000&@55
 @75
 |[@1|n|o|r|e|t|u|r|n|]@1| |v+0#00e0003&|o|i|d| +0#0000000&|e|r@1|o|r|_|e|x|i|t|(|c+0#00e0003&|o|n|s|t| +0#0000000&|c+0#00e0003&|h|a|r|*+0#0000000&| |r|e|a|s|o|n|)| @26
@@ -12,9 +17,4 @@
 @4|p|u|t|s|(|"+0#e000002&|P|r|e|p|a|r|i|n|g| |t|o| |e|x|i|t|.@2|"|)+0#0000000&|;| @41
 @4|e|r@1|o|r|_|e|x|i|t|(|"+0#e000002&|A|s@1|u|m|e| |s|o|m|e|t|h|i|n|g| |i|s| |w|r|o|n|g|"|)+0#0000000&|;| @30
 @4|p|u|t|s|(|"+0#e000002&|T|h|i|s| |c|o|d|e| |i|s| |n|e|v|e|r| |e|x|e|c|u|t|e|d|.|"|)+0#0000000&|;| @33
-|}| @73
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|1|,|1| @10|A|l@1| 
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/cpp_noreturn_01.dump b/runtime/syntax/testdir/dumps/cpp_noreturn_01.dump
new file mode 100644 (file)
index 0000000..7b4cd7c
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60
+|{| @73
+@4|p|u|t|s|(|"+0#e000002&|P|r|e|p|a|r|i|n|g| |t|o| |e|x|i|t|.@2|"|)+0#0000000&|;| @41
+@4|e|r@1|o|r|_|e|x|i|t|(|"+0#e000002&|A|s@1|u|m|e| |s|o|m|e|t|h|i|n|g| |i|s| |w|r|o|n|g|"|)+0#0000000&|;| @30
+@4>p|u|t|s|(|"+0#e000002&|T|h|i|s| |c|o|d|e| |i|s| |n|e|v|e|r| |e|x|e|c|u|t|e|d|.|"|)+0#0000000&|;| @33
+|}| @73
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|8|,|5| @9|B|o|t| 
index a2413c866a00a89eaf9ca61f1bdbd48590b99c86..8b2202bf8e9219682faa5adef7a5675b1748ba02 100644 (file)
@@ -1,3 +1,7 @@
+// C functions - _Noreturn function specifier (since C11)(deprecated in C23)
+
+// Source: https://en.cppreference.com/w/c/language/noreturn.html
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdnoreturn.h>
@@ -16,3 +20,4 @@ int main(void)
     exit_now(2);
     puts("This code is never executed.");
 }
+
index c2b729f5990a4fd30a459d81c03a0505cbdb0617..9c50dea2ec3e6fcd01daadcd3e52a27776c96f78 100644 (file)
@@ -1,3 +1,7 @@
+// C++ attributes - noreturn (since C++11)
+
+// Source: https://en.cppreference.com/w/c/language/noreturn.html [modified by Vim Project]
+
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -13,3 +17,4 @@ int main(void)
     error_exit("Assume something is wrong");
     puts("This code is never executed.");
 }
+