Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2019-02-16 19:32:21 -0500
committerNathan Ridge2019-02-28 20:45:43 -0500
commit4a35647d1f145ce64b5f07f0fba3681f5d3b359a (patch)
treec8a2f5930ebc945625a2a94e03c97bc8ee5fab89 /core/org.eclipse.cdt.core.tests
parent783af3dee625096e04cd7a162c3058d9d28451d1 (diff)
downloadorg.eclipse.cdt-4a35647d1f145ce64b5f07f0fba3681f5d3b359a.tar.gz
org.eclipse.cdt-4a35647d1f145ce64b5f07f0fba3681f5d3b359a.tar.xz
org.eclipse.cdt-4a35647d1f145ce64b5f07f0fba3681f5d3b359a.zip
Bug 544509 - Evaluation of negative integer cast to unsigned
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index 90d4b2a7b7e..43a8fd83eb2 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -12719,6 +12719,12 @@ public class AST2CPPTests extends AST2CPPTestBase {
helper.assertVariableValue("waldo", 1);
}
+ // constexpr bool waldo = unsigned(-1) < unsigned(0);
+ public void testNegativeCastToUnsigned_544509() throws Exception {
+ BindingAssertionHelper helper = getAssertionHelper();
+ helper.assertVariableValue("waldo", 0);
+ }
+
// namespace x {
// void foo();
// }

Back to the top