blob: 927e1546a185a24ffd7e98c2a1758a9cac50efe9 [file] [log] [blame]
### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.core
Index: src/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java,v
retrieving revision 1.146
diff -u -r1.146 CVisitor.java
--- src/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java 15 Jan 2010 18:28:40 -0000 1.146
+++ src/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java 23 Jun 2010 09:53:58 -0000
@@ -29,6 +29,7 @@
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
import org.eclipse.cdt.core.dom.ast.IASTForStatement;
@@ -53,6 +54,7 @@
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
import org.eclipse.cdt.core.dom.ast.IArrayType;
import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IEnumeration;
@@ -67,8 +69,6 @@
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.IVariable;
-import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
-import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
import org.eclipse.cdt.core.dom.ast.c.ICASTArrayModifier;
import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
@@ -638,28 +638,31 @@
IScope scope = getContainingScope(expr);
try {
IBinding[] bs = scope.find(PTRDIFF_T);
- if (bs.length > 0) {
- for (IBinding b : bs) {
- if (b instanceof IType) {
- if (b instanceof ICInternalBinding == false ||
- CVisitor.declaredBefore(((ICInternalBinding) b).getPhysicalNode(), expr)) {
- return (IType) b;
- }
+ for (IBinding b : bs) {
+ if (b instanceof IType) {
+ if (b instanceof ICInternalBinding == false ||
+ CVisitor.declaredBefore(((ICInternalBinding) b).getPhysicalNode(), expr)) {
+ return (IType) b;
}
}
}
} catch (DOMException e) {
}
- return new CBasicType(Kind.eInt, IBasicType.IS_UNSIGNED | IBasicType.IS_LONG, expr);
+ return new CBasicType(Kind.eInt, 0, expr);
}
static IType getSize_T(IASTExpression expr) {
IScope scope = getContainingScope(expr);
try {
IBinding[] bs = scope.find(SIZE_T);
- if (bs.length > 0 && bs[0] instanceof IType) {
- return (IType) bs[0];
+ for (IBinding b : bs) {
+ if (b instanceof IType) {
+ if (b instanceof ICInternalBinding == false ||
+ CVisitor.declaredBefore(((ICInternalBinding) b).getPhysicalNode(), expr)) {
+ return (IType) b;
+ }
+ }
}
} catch (DOMException e) {
}
Index: src/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java,v
retrieving revision 1.123
diff -u -r1.123 CPPVisitor.java
--- src/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java 22 Jun 2010 12:21:17 -0000 1.123
+++ src/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java 23 Jun 2010 09:53:58 -0000
@@ -2089,7 +2089,7 @@
}
} catch (DOMException e) {
}
- basicType= new CPPBasicType(Kind.eInt, IBasicType.IS_LONG | IBasicType.IS_UNSIGNED);
+ basicType= new CPPBasicType(Kind.eInt, 0);
basicType.setFromExpression(binary);
return basicType;
}