Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2019-10-01 22:10:03 -0400
committerNathan Ridge2019-10-14 12:22:43 -0400
commit02789c6a1e31a88583349c9c4a394f1e7e8f9fb1 (patch)
tree27dd19de7e6ca37b31f657f23274f8224ba1285a /core/org.eclipse.cdt.core/parser
parent5c77776dcd0bd006d0161cc0d7d6870e738dd8b0 (diff)
downloadorg.eclipse.cdt-master.tar.gz
org.eclipse.cdt-master.tar.xz
org.eclipse.cdt-master.zip
Bug 551689 - Fix equivalence computation for simple literalsHEADmaster
We were using equals() on char[] array objects which returned false if the objects were distinct, even if they contained the same characters. Change-Id: Iff5da52c67a0c17d857d791f57e768aafa7e165d
Diffstat (limited to 'core/org.eclipse.cdt.core/parser')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
index 6aa59fb0cf..a8b5ccf245 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
@@ -251,6 +251,6 @@ public final class CStringValue implements IValue {
return false;
}
CStringValue o = (CStringValue) other;
- return fFixedValue.equals(o.fFixedValue);
+ return CharArrayUtils.equals(fFixedValue, o.fFixedValue);
}
} \ No newline at end of file
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java
index a083786403..cb233077d3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java
@@ -182,6 +182,6 @@ public final class FloatingPointValue implements IValue {
return false;
}
FloatingPointValue o = (FloatingPointValue) other;
- return fFixedValue.equals(o.fFixedValue);
+ return CharArrayUtils.equals(fFixedValue, o.fFixedValue);
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
index 1cf9d4f822..4487599727 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
@@ -297,6 +297,6 @@ public class IntegralValue implements IValue {
return false;
}
IntegralValue o = (IntegralValue) other;
- return fFixedValue.equals(o.fFixedValue);
+ return CharArrayUtils.equals(fFixedValue, o.fFixedValue);
}
}

Back to the top