summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d
diff options
context:
space:
mode:
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d
new file mode 100644
index 00000000..73cdf4ac
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/d/40002-volatile.d
@@ -0,0 +1,28 @@
+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;
+}