Silence dead code warning
Clang produces:
"error: code will never be executed [-Werror,-Wunreachable-code]"
For code following an unconditional `break`. But it hints that:
"note: silence by adding parentheses to mark code as explicitly dead"
Hence the dead code can follow an "if((true)) break;" without producing
the warning/error.
Note that in this instance we could have just removed the dead code, but
I wanted to make it clear that this is an example of an unfinished
Reactor function.
Bug: b/178929463
Change-Id: I1ea4dac91877fcede189d09e3953568b2813129e
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52288
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/tests/ReactorUnitTests/ReactorUnitTests.cpp b/tests/ReactorUnitTests/ReactorUnitTests.cpp
index b615756..16c9fb4 100644
--- a/tests/ReactorUnitTests/ReactorUnitTests.cpp
+++ b/tests/ReactorUnitTests/ReactorUnitTests.cpp
@@ -211,7 +211,7 @@
Int a = function.Arg<0>();
Int z = 4;
- break; // Terminate do-while early.
+ if((true)) break; // Terminate do-while early.
Return(a + z);
}