summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d
diff options
context:
space:
mode:
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d
new file mode 100644
index 00000000..c42d1893
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/volatile.d
@@ -0,0 +1,27 @@
+void foo(void)
+{
+while (nextSegmentIndex >= 0)
+{
+ Segment seg = map.segments[nextSegmentIndex--];
+ volatile if (seg.count)
+ {
+ currentTable = seg.table;
+ for (int j = currentTable.length - 1; j >= 0; --j)
+ {
+ if ((nextEntry = currentTable[j]) !is null)
+ {
+ nextTableIndex = j - 1;
+ return;
+ }
+ }
+ }
+}
+
+if (e)
+ volatile
+ {
+ oldValue = e.value;
+ e.value = newValue;
+ }
+return oldValue;
+}