mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 297438: Parameter defaults get lost in index.
This commit is contained in:
parent
36d621341c
commit
0209ac4783
21 changed files with 252 additions and 192 deletions
|
@ -1185,4 +1185,35 @@ public class IndexUpdateTests extends IndexTestBase {
|
|||
updateFile();
|
||||
checkFunction("useRef", new String[]{"char", "int"}, new String[]{});
|
||||
}
|
||||
|
||||
// void f(int a, int b=0);
|
||||
|
||||
// #include "header.h"
|
||||
// void f(int a, int b) {}
|
||||
// void ref() {
|
||||
// f(1);
|
||||
// }
|
||||
|
||||
// #include "header.h"
|
||||
// void f(int a, int b) {}
|
||||
// void ref() {
|
||||
// f(1);
|
||||
// }
|
||||
public void testDefaultParam_Bug297438() throws Exception {
|
||||
setupHeader(3, true);
|
||||
setupFile(3, true);
|
||||
checkReferenceCount("f", 1);
|
||||
updateFile();
|
||||
checkReferenceCount("f", 1);
|
||||
}
|
||||
|
||||
private void checkReferenceCount(String name, int count) throws InterruptedException, CoreException {
|
||||
fIndex.acquireReadLock();
|
||||
try {
|
||||
IBinding func = findBinding(name);
|
||||
assertEquals(count, fIndex.findReferences(func).length);
|
||||
} finally {
|
||||
fIndex.releaseReadLock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,4 +52,9 @@ public interface ICPPFunction extends IFunction, ICPPBinding {
|
|||
* @since 5.1
|
||||
*/
|
||||
public ICPPFunctionType getType() throws DOMException;
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
public ICPPParameter[] getParameters() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,11 @@ import org.eclipse.cdt.core.dom.ast.IParameter;
|
|||
*/
|
||||
public interface ICPPParameter extends IParameter, ICPPVariable {
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
ICPPParameter[] EMPTY_CPPPARAMETER_ARRAY = {};
|
||||
|
||||
/**
|
||||
* if there is a default value or not.
|
||||
*/
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IScope;
|
|||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
|
@ -438,7 +439,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_va_list;
|
||||
functionType = new CPPFunctionType(cpp_void_p, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_VA_START, scope, functionType, theParms, true);
|
||||
}
|
||||
|
@ -461,7 +462,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_va_list;
|
||||
functionType = new CPPFunctionType(cpp_void, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_VA_END, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -487,7 +488,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_va_list;
|
||||
parms[1] = cpp_va_list;
|
||||
functionType = new CPPFunctionType(cpp_void, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_VA_COPY, scope, functionType, theParms, false);
|
||||
|
@ -514,7 +515,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_int;
|
||||
parms[1] = cpp_long_int;
|
||||
functionType = new CPPFunctionType(cpp_long_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_EXPECT, scope, functionType, theParms, false);
|
||||
|
@ -542,7 +543,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_unsigned_int;
|
||||
functionType = new CPPFunctionType(cpp_void_p, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FRAME_ADDRESS, scope, functionType, theParms, false);
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
@ -567,7 +568,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_void_p;
|
||||
functionType = new CPPFunctionType(cpp_void, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PREFETCH, scope, functionType, theParms, true);
|
||||
}
|
||||
|
@ -590,7 +591,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_HUGE_VAL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -611,7 +612,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_HUGE_VALF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -632,7 +633,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_HUGE_VALL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -656,7 +657,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_INF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -677,7 +678,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_INFF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -698,7 +699,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_INFL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -721,7 +722,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NAN, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -742,7 +743,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NANF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -763,7 +764,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NANL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -784,7 +785,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NANS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -805,7 +806,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NANSF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -826,7 +827,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_NANSL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -838,6 +839,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IBinding temp = null;
|
||||
IFunctionType functionType = null;
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theCPPParms = new ICPPParameter[1];
|
||||
if (lang == ParserLanguage.C) {
|
||||
IType[] parms = new IType[1];
|
||||
parms[0] = c_unsigned_int;
|
||||
|
@ -848,8 +850,8 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_unsigned_int;
|
||||
functionType = new CPPFunctionType(cpp_int, parms);
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFS, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
theCPPParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFS, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -858,7 +860,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CLZ, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZ, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZ, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -867,7 +869,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CTZ, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZ, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZ, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -876,7 +878,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_POPCOUNT, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNT, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNT, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -885,7 +887,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_PARITY, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITY, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITY, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
}
|
||||
|
@ -895,6 +897,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IBinding temp = null;
|
||||
IFunctionType functionType = null;
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theCPPParms = new ICPPParameter[1];
|
||||
if (lang == ParserLanguage.C) {
|
||||
IType[] parms = new IType[1];
|
||||
parms[0] = c_unsigned_long;
|
||||
|
@ -905,8 +908,8 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_unsigned_long;
|
||||
functionType = new CPPFunctionType(cpp_int, parms);
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFSL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
theCPPParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFSL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -915,7 +918,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CLZL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -924,7 +927,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CTZL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -933,7 +936,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_POPCOUNTL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNTL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNTL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -942,7 +945,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_PARITYL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITYL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITYL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
}
|
||||
|
@ -952,6 +955,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IBinding temp = null;
|
||||
IFunctionType functionType = null;
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theCPPParms = new ICPPParameter[1];
|
||||
if (lang == ParserLanguage.C) {
|
||||
IType[] parms = new IType[1];
|
||||
parms[0] = c_unsigned_long_long;
|
||||
|
@ -962,8 +966,8 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_unsigned_long_long;
|
||||
functionType = new CPPFunctionType(cpp_int, parms);
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFSLL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
theCPPParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FFSLL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -972,7 +976,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CLZLL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZLL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CLZLL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -981,7 +985,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_CTZLL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZLL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CTZLL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -990,7 +994,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_POPCOUNTLL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNTLL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POPCOUNTLL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
||||
|
@ -999,7 +1003,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
if (lang == ParserLanguage.C) {
|
||||
temp = new CImplicitFunction(__BUILTIN_PARITYLL, scope, functionType, theParms, false);
|
||||
} else {
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITYLL, scope, (ICPPFunctionType) functionType, theParms, false);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PARITYLL, scope, (ICPPFunctionType) functionType, theCPPParms, false);
|
||||
}
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
}
|
||||
|
@ -1043,7 +1047,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_unspecified;
|
||||
parms[1] = cpp_unspecified;
|
||||
functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_TYPES_COMPATIBLE_P, scope, functionType, theParms, true);
|
||||
|
@ -1069,7 +1073,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_double;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POWI, scope, functionType, theParms, false);
|
||||
|
@ -1093,7 +1097,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POWIF, scope, functionType, theParms, false);
|
||||
|
@ -1117,7 +1121,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_double;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_POWIL, scope, functionType, theParms, false);
|
||||
|
@ -1140,7 +1144,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_void;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_void, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ABORT, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1167,7 +1171,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_void, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_EXIT1, scope, functionType, theParms, false);
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
@ -1193,7 +1197,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double_complex, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CONJ, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1213,7 +1217,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_float_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float_complex, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CONJF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1233,7 +1237,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double_complex, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CONJL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1255,7 +1259,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CREAL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1275,7 +1279,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_float_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CREALF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1295,7 +1299,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CREALL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1314,7 +1318,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CIMAG, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1334,7 +1338,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_float_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CIMAGF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1354,7 +1358,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_double_complex;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_CIMAGL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1376,7 +1380,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ABS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1396,7 +1400,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FABS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1416,7 +1420,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_LABS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1436,7 +1440,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_signed_long_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_signed_long_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_IMAXABS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1456,7 +1460,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_long_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_long_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_LLABS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1476,7 +1480,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FABSF, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1496,7 +1500,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FABSL, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -1518,7 +1522,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PRINTF, scope, functionType, theParms, true);
|
||||
}
|
||||
|
@ -1541,7 +1545,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_char_p_r;
|
||||
parms[1] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_SPRINTF, scope, functionType, theParms, true);
|
||||
|
@ -1568,7 +1572,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_size_t;
|
||||
parms[2] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -1593,7 +1597,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_FILE_p_r;
|
||||
parms[1] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FPRINTF, scope, functionType, theParms, true);
|
||||
|
@ -1617,7 +1621,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p_r;
|
||||
parms[1] = cpp_va_list;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_VPRINTF, scope, functionType, theParms, true);
|
||||
|
@ -1651,7 +1655,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[2] = cpp_const_char_p_r;
|
||||
parms[3] = cpp_va_list;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[4];
|
||||
ICPPParameter[] theParms = new ICPPParameter[4];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -1681,7 +1685,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p_r;
|
||||
parms[1] = cpp_va_list;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_VSCANF, scope, functionType, theParms, false);
|
||||
|
@ -1708,7 +1712,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_char_p_r;
|
||||
parms[2] = cpp_va_list;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -1730,7 +1734,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_SCANF, scope, functionType, theParms, true);
|
||||
}
|
||||
|
@ -1753,7 +1757,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p_r;
|
||||
parms[1] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_SSCANF, scope, functionType, theParms, true);
|
||||
|
@ -1819,7 +1823,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ACOS, scope, functionType, theParms, false);
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
@ -1913,7 +1917,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ACOSF, scope, functionType, theParms, false);
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
@ -2009,7 +2013,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_long_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ACOSL, scope, functionType, theParms, false);
|
||||
bindings = (IBinding[]) ArrayUtil.append(IBinding.class, bindings, temp);
|
||||
|
@ -2065,7 +2069,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_double;
|
||||
parms[1] = cpp_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ATAN2, scope, functionType, theParms, false);
|
||||
|
@ -2094,7 +2098,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ATAN2F, scope, functionType, theParms, false);
|
||||
|
@ -2123,7 +2127,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_double;
|
||||
parms[1] = cpp_long_double;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ATAN2L, scope, functionType, theParms, false);
|
||||
|
@ -2149,7 +2153,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_MODFF, scope, functionType, theParms, false);
|
||||
|
@ -2173,7 +2177,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_double;
|
||||
parms[1] = cpp_long_double_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_MODFL, scope, functionType, theParms, false);
|
||||
|
@ -2197,7 +2201,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_double;
|
||||
parms[1] = cpp_int_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FREXP, scope, functionType, theParms, false);
|
||||
|
@ -2221,7 +2225,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_int_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FREXPF, scope, functionType, theParms, false);
|
||||
|
@ -2245,7 +2249,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_double;
|
||||
parms[1] = cpp_int_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FREXPL, scope, functionType, theParms, false);
|
||||
|
@ -2269,7 +2273,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_double;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_LDEXP, scope, functionType, theParms, false);
|
||||
|
@ -2293,7 +2297,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_float, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_LDEXPF, scope, functionType, theParms, false);
|
||||
|
@ -2317,7 +2321,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_long_double;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_long_double, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_LDEXPL, scope, functionType, theParms, false);
|
||||
|
@ -2343,7 +2347,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p_r;
|
||||
parms[1] = cpp_FILE_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_FPUTS, scope, functionType, theParms, false);
|
||||
|
@ -2364,7 +2368,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PUTCHAR, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -2384,7 +2388,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_PUTS, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -2406,7 +2410,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_void_p, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ALLOCA, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -2431,7 +2435,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_void_p;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2459,7 +2463,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_void_p_r;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_void_p, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2487,7 +2491,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_int;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_void_p, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2514,7 +2518,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_char_p_r;
|
||||
parms[1] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRCAT, scope, functionType, theParms, false);
|
||||
|
@ -2538,7 +2542,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRCHR, scope, functionType, theParms, false);
|
||||
|
@ -2562,7 +2566,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRCMP, scope, functionType, theParms, false);
|
||||
|
@ -2586,7 +2590,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_char_p_r;
|
||||
parms[1] = cpp_const_char_p_r;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRCPY, scope, functionType, theParms, false);
|
||||
|
@ -2610,7 +2614,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_size_t, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRCSPN, scope, functionType, theParms, false);
|
||||
|
@ -2631,7 +2635,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
IType[] parms = new IType[1];
|
||||
parms[0] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_size_t, parms);
|
||||
IParameter[] theParms = new IParameter[1];
|
||||
ICPPParameter[] theParms = new ICPPParameter[1];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRLEN, scope, functionType, theParms, false);
|
||||
}
|
||||
|
@ -2654,7 +2658,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRPBRK, scope, functionType, theParms, false);
|
||||
|
@ -2678,7 +2682,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_int;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRRCHR, scope, functionType, theParms, false);
|
||||
|
@ -2702,7 +2706,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_size_t, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRSPN, scope, functionType, theParms, false);
|
||||
|
@ -2726,7 +2730,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_const_char_p;
|
||||
parms[1] = cpp_const_char_p;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_STRSTR, scope, functionType, theParms, false);
|
||||
|
@ -2753,7 +2757,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_char_p_r;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2781,7 +2785,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_char_p;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2809,7 +2813,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[1] = cpp_const_char_p_r;
|
||||
parms[2] = cpp_size_t;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_char_p, parms);
|
||||
IParameter[] theParms = new IParameter[3];
|
||||
ICPPParameter[] theParms = new ICPPParameter[3];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = new CPPBuiltinParameter(parms[1]);
|
||||
theParms[2] = new CPPBuiltinParameter(parms[2]);
|
||||
|
@ -2836,7 +2840,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISGREATER, scope, functionType, theParms, false);
|
||||
|
@ -2860,7 +2864,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISGREATEREQUAL, scope, functionType, theParms, false);
|
||||
|
@ -2884,7 +2888,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISLESS, scope, functionType, theParms, false);
|
||||
|
@ -2908,7 +2912,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISLESSEQUAL, scope, functionType, theParms, false);
|
||||
|
@ -2932,7 +2936,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISLESSGREATER, scope, functionType, theParms, false);
|
||||
|
@ -2956,7 +2960,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
|
|||
parms[0] = cpp_float;
|
||||
parms[1] = cpp_float;
|
||||
ICPPFunctionType functionType = new CPPFunctionType(cpp_int, parms);
|
||||
IParameter[] theParms = new IParameter[2];
|
||||
ICPPParameter[] theParms = new ICPPParameter[2];
|
||||
theParms[0] = new CPPBuiltinParameter(parms[0]);
|
||||
theParms[1] = theParms[0];
|
||||
temp = new CPPImplicitFunction(__BUILTIN_ISUNORDERED, scope, functionType, theParms, false);
|
||||
|
|
|
@ -13,18 +13,18 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.Linkage;
|
||||
|
@ -65,14 +65,14 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
|
|||
// void *
|
||||
IType cpp_void_p = new GPPPointerType(new CPPQualifierType(new CPPBasicType(Kind.eVoid, 0), false, false), new GPPASTPointer());
|
||||
// size_t // assumed: unsigned long int
|
||||
IType cpp_size_t = new CPPBasicType(Kind.eInt, ICPPBasicType.IS_LONG & ICPPBasicType.IS_UNSIGNED);
|
||||
IType cpp_size_t = new CPPBasicType(Kind.eInt, IBasicType.IS_LONG & IBasicType.IS_UNSIGNED);
|
||||
|
||||
// void * operator new (std::size_t);
|
||||
IBinding temp = null;
|
||||
IType[] newParms = new IType[1];
|
||||
newParms[0] = cpp_size_t;
|
||||
ICPPFunctionType newFunctionType = new CPPFunctionType(cpp_void_p, newParms);
|
||||
IParameter[] newTheParms = new IParameter[1];
|
||||
ICPPParameter[] newTheParms = new ICPPParameter[1];
|
||||
newTheParms[0] = new CPPBuiltinParameter(newParms[0]);
|
||||
temp = new CPPImplicitFunction(OverloadableOperator.NEW.toCharArray(), theScope, newFunctionType, newTheParms, false);
|
||||
theScope.addBinding(temp);
|
||||
|
@ -87,7 +87,7 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
|
|||
IType[] deleteParms = new IType[1];
|
||||
deleteParms[0] = cpp_void_p;
|
||||
ICPPFunctionType deleteFunctionType = new CPPFunctionType(cpp_void, deleteParms);
|
||||
IParameter[] deleteTheParms = new IParameter[1];
|
||||
ICPPParameter[] deleteTheParms = new ICPPParameter[1];
|
||||
deleteTheParms[0] = new CPPBuiltinParameter(deleteParms[0]);
|
||||
temp = new CPPImplicitFunction(OverloadableOperator.DELETE.toCharArray(), theScope, deleteFunctionType, deleteTheParms, false);
|
||||
theScope.addBinding(temp);
|
||||
|
|
|
@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.IValue;
|
||||
|
@ -23,12 +22,12 @@ import org.eclipse.cdt.internal.core.dom.Linkage;
|
|||
import org.eclipse.core.runtime.PlatformObject;
|
||||
|
||||
public class CPPBuiltinParameter extends PlatformObject implements ICPPParameter {
|
||||
public static IParameter[] createParameterList(ICPPFunctionType ft) {
|
||||
public static ICPPParameter[] createParameterList(ICPPFunctionType ft) {
|
||||
if (ft == null) {
|
||||
return IParameter.EMPTY_PARAMETER_ARRAY;
|
||||
return ICPPParameter.EMPTY_CPPPARAMETER_ARRAY;
|
||||
}
|
||||
IType[] ptypes= ft.getParameterTypes();
|
||||
IParameter[] result= new IParameter[ptypes.length];
|
||||
ICPPParameter[] result= new ICPPParameter[ptypes.length];
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
result[i]= new CPPBuiltinParameter(ptypes[i]);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -50,6 +49,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.index.IIndexFileSet;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.core.parser.util.CharArrayObjectMap;
|
||||
|
@ -99,9 +99,9 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
|
|||
}
|
||||
char[] className = name.getLookupKey();
|
||||
|
||||
IParameter[] voidPs = new IParameter[] { new CPPParameter(CPPSemantics.VOID_TYPE, 0) };
|
||||
ICPPParameter[] voidPs = new ICPPParameter[] { new CPPParameter(CPPSemantics.VOID_TYPE, 0) };
|
||||
IType pType = new CPPReferenceType(SemanticUtil.addQualifiers(clsType, true, false), false);
|
||||
IParameter[] ps = new IParameter[] { new CPPParameter(pType, 0) };
|
||||
ICPPParameter[] ps = new ICPPParameter[] { new CPPParameter(pType, 0) };
|
||||
|
||||
int i= 0;
|
||||
ImplicitsAnalysis ia= new ImplicitsAnalysis(compTypeSpec);
|
||||
|
@ -190,7 +190,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
|
|||
super.addName(name);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void addConstructor(Object constructor) {
|
||||
if (bindings == null)
|
||||
bindings = new CharArrayObjectMap(1);
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -41,6 +40,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPBlockScope;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.Linkage;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
||||
|
@ -60,7 +60,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
|||
super(node, id, arg);
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
throw new DOMException(this);
|
||||
}
|
||||
|
||||
|
@ -209,21 +209,21 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
|||
return ASTQueries.findTypeRelevantDeclarator((IASTDeclarator) node);
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() {
|
||||
public ICPPParameter[] getParameters() {
|
||||
IASTStandardFunctionDeclarator dtor = getPreferredDtor();
|
||||
if (dtor == null) {
|
||||
return CPPBuiltinParameter.createParameterList(getType());
|
||||
}
|
||||
IASTParameterDeclaration[] params = dtor.getParameters();
|
||||
int size = params.length;
|
||||
IParameter[] result = new IParameter[size];
|
||||
ICPPParameter[] result = new ICPPParameter[size];
|
||||
if (size > 0) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
IASTParameterDeclaration p = params[i];
|
||||
final IASTName name = getParamName(p);
|
||||
final IBinding binding= name.resolveBinding();
|
||||
if (binding instanceof IParameter) {
|
||||
result[i]= (IParameter) binding;
|
||||
if (binding instanceof ICPPParameter) {
|
||||
result[i]= (ICPPParameter) binding;
|
||||
} else {
|
||||
result[i] = new CPPParameter.CPPParameterProblem(p, IProblemBinding.SEMANTIC_INVALID_TYPE,
|
||||
name.toCharArray());
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
|
||||
|
@ -41,7 +40,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
|||
*/
|
||||
public class CPPFunctionSpecialization extends CPPSpecialization implements ICPPFunction, ICPPInternalFunction {
|
||||
private ICPPFunctionType type = null;
|
||||
private IParameter[] specializedParams = null;
|
||||
private ICPPParameter[] specializedParams = null;
|
||||
private IType[] specializedExceptionSpec = null;
|
||||
|
||||
public CPPFunctionSpecialization(IBinding orig, IBinding owner, ICPPTemplateParameterMap argMap) {
|
||||
|
@ -52,13 +51,13 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
|
|||
return (ICPPFunction) getSpecializedBinding();
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
if (specializedParams == null) {
|
||||
ICPPFunction function = (ICPPFunction) getSpecializedBinding();
|
||||
IParameter[] params = function.getParameters();
|
||||
specializedParams = new IParameter[params.length];
|
||||
ICPPParameter[] params = function.getParameters();
|
||||
specializedParams = new ICPPParameter[params.length];
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
specializedParams[i] = new CPPParameterSpecialization((ICPPParameter)params[i],
|
||||
specializedParams[i] = new CPPParameterSpecialization(params[i],
|
||||
this, getTemplateParameterMap());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,16 +27,15 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
|
@ -47,9 +46,9 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
|||
* Implementation of function templates
|
||||
*/
|
||||
public class CPPFunctionTemplate extends CPPTemplateDefinition
|
||||
implements ICPPFunctionTemplate, ICPPFunction, ICPPInternalFunction {
|
||||
implements ICPPFunctionTemplate, ICPPInternalFunction {
|
||||
public static final class CPPFunctionTemplateProblem extends ProblemBinding
|
||||
implements ICPPFunctionTemplate, ICPPFunction {
|
||||
implements ICPPFunctionTemplate {
|
||||
public CPPFunctionTemplateProblem(IASTNode node, int id, char[] arg) {
|
||||
super(node, id, arg);
|
||||
}
|
||||
|
@ -77,7 +76,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
|
|||
public boolean isExternC() throws DOMException {
|
||||
throw new DOMException(this);
|
||||
}
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
throw new DOMException(this);
|
||||
}
|
||||
public IScope getFunctionScope() throws DOMException {
|
||||
|
@ -153,19 +152,19 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
|
|||
return null;
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() {
|
||||
public ICPPParameter[] getParameters() {
|
||||
ICPPASTFunctionDeclarator fdecl= getFirstFunctionDtor();
|
||||
if (fdecl != null) {
|
||||
IASTParameterDeclaration[] params = fdecl.getParameters();
|
||||
int size = params.length;
|
||||
IParameter[] result = new IParameter[size];
|
||||
ICPPParameter[] result = new ICPPParameter[size];
|
||||
if (size > 0) {
|
||||
for(int i = 0; i < size; i++) {
|
||||
IASTParameterDeclaration p = params[i];
|
||||
final IASTName pname = ASTQueries.findInnermostDeclarator(p.getDeclarator()).getName();
|
||||
final IBinding binding= pname.resolveBinding();
|
||||
if (binding instanceof IParameter) {
|
||||
result[i]= (IParameter) binding;
|
||||
if (binding instanceof ICPPParameter) {
|
||||
result[i]= (ICPPParameter) binding;
|
||||
} else {
|
||||
result[i] = new CPPParameter.CPPParameterProblem(p,
|
||||
IProblemBinding.SEMANTIC_INVALID_TYPE, pname.toCharArray());
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +25,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
|||
*/
|
||||
public class CPPImplicitConstructor extends CPPImplicitMethod implements ICPPConstructor {
|
||||
|
||||
public CPPImplicitConstructor(ICPPClassScope scope, char[] name, IParameter[] params) {
|
||||
public CPPImplicitConstructor(ICPPClassScope scope, char[] name, ICPPParameter[] params) {
|
||||
super( scope, name, createFunctionType(scope, params), params );
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
|
||||
/**
|
||||
* The CPPImplicitFunction is used to represent implicit functions that exist on the translation
|
||||
|
@ -24,13 +24,13 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
|||
*/
|
||||
public class CPPImplicitFunction extends CPPFunction {
|
||||
|
||||
private IParameter[] parms=null;
|
||||
private ICPPParameter[] parms=null;
|
||||
private IScope scope=null;
|
||||
private ICPPFunctionType functionType=null;
|
||||
private boolean takesVarArgs=false;
|
||||
private char[] name=null;
|
||||
|
||||
public CPPImplicitFunction(char[] name, IScope scope, ICPPFunctionType type, IParameter[] parms, boolean takesVarArgs) {
|
||||
public CPPImplicitFunction(char[] name, IScope scope, ICPPFunctionType type, ICPPParameter[] parms, boolean takesVarArgs) {
|
||||
super( null );
|
||||
this.name=name;
|
||||
this.scope=scope;
|
||||
|
@ -40,7 +40,7 @@ public class CPPImplicitFunction extends CPPFunction {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IParameter [] getParameters() {
|
||||
public ICPPParameter [] getParameters() {
|
||||
return parms;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
|
||||
|
@ -33,6 +32,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.parser.util.CharArrayUtils;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
|
@ -43,7 +43,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
|||
*/
|
||||
public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod {
|
||||
|
||||
public CPPImplicitMethod(ICPPClassScope scope, char[] name, ICPPFunctionType type, IParameter[] params) {
|
||||
public CPPImplicitMethod(ICPPClassScope scope, char[] name, ICPPFunctionType type, ICPPParameter[] params) {
|
||||
super(name, scope, type, params, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
|
||||
/**
|
||||
* Represents a reference to a (member) function (instance), which cannot be resolved because
|
||||
|
@ -59,8 +59,8 @@ public class CPPUnknownFunction extends CPPUnknownBinding implements ICPPFunctio
|
|||
return asScope();
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
return IParameter.EMPTY_PARAMETER_ARRAY;
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
return ICPPParameter.EMPTY_CPPPARAMETER_ARRAY;
|
||||
}
|
||||
|
||||
public ICPPFunctionType getType() throws DOMException {
|
||||
|
|
|
@ -2916,7 +2916,7 @@ public class CPPSemantics {
|
|||
|
||||
private static IBinding createSurrogateCallFunction(IScope scope, IType returnType, IType rt, IType[] parameterTypes) {
|
||||
IType[] parms = new IType[parameterTypes.length+1];
|
||||
IParameter[] theParms = new IParameter[parms.length];
|
||||
ICPPParameter[] theParms = new ICPPParameter[parms.length];
|
||||
|
||||
parms[0] = rt;
|
||||
theParms[0]= new CPPBuiltinParameter(rt);
|
||||
|
|
|
@ -13,11 +13,11 @@ package org.eclipse.cdt.internal.core.index.composite.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
|
@ -43,10 +43,10 @@ class CompositeCPPFunction extends CompositeCPPBinding implements ICPPFunction {
|
|||
fail(); return null;
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
IParameter[] result = ((ICPPFunction)rbinding).getParameters();
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
ICPPParameter[] result = ((ICPPFunction)rbinding).getParameters();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
result[i] = (IParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
result[i] = (ICPPParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -15,12 +15,12 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
|||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.internal.core.Util;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
|
||||
import org.eclipse.cdt.internal.core.index.IndexCPPSignatureUtil;
|
||||
|
@ -93,7 +93,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
}
|
||||
}
|
||||
|
||||
public void initData(ICPPFunctionType ftype, IParameter[] params, IType[] exceptionSpec) {
|
||||
public void initData(ICPPFunctionType ftype, ICPPParameter[] params, IType[] exceptionSpec) {
|
||||
try {
|
||||
setType(ftype);
|
||||
setParameters(params);
|
||||
|
@ -108,7 +108,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
if (newBinding instanceof ICPPFunction) {
|
||||
ICPPFunction func= (ICPPFunction) newBinding;
|
||||
ICPPFunctionType newType;
|
||||
IParameter[] newParams;
|
||||
ICPPParameter[] newParams;
|
||||
byte newAnnotation;
|
||||
try {
|
||||
newType= func.getType();
|
||||
|
@ -119,12 +119,22 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
}
|
||||
|
||||
fType= null;
|
||||
getLinkage().storeType(record+FUNCTION_TYPE, newType);
|
||||
linkage.storeType(record+FUNCTION_TYPE, newType);
|
||||
|
||||
PDOMCPPParameter oldParams= getFirstParameter(null);
|
||||
setParameters(newParams);
|
||||
if (oldParams != null) {
|
||||
oldParams.delete(linkage);
|
||||
if (oldParams != null && hasDeclaration()) {
|
||||
for (ICPPParameter newPar : newParams) {
|
||||
oldParams.update(newPar);
|
||||
long next= oldParams.getNextPtr();
|
||||
if (next == 0)
|
||||
break;
|
||||
oldParams= new PDOMCPPParameter(linkage, next, null);
|
||||
}
|
||||
} else {
|
||||
setParameters(newParams);
|
||||
if (oldParams != null) {
|
||||
oldParams.delete(linkage);
|
||||
}
|
||||
}
|
||||
final Database db = getDB();
|
||||
db.putByte(record + ANNOTATION, newAnnotation);
|
||||
|
@ -159,7 +169,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
return exceptionSpec;
|
||||
}
|
||||
|
||||
private void setParameters(IParameter[] params) throws CoreException {
|
||||
private void setParameters(ICPPParameter[] params) throws CoreException {
|
||||
final PDOMLinkage linkage = getLinkage();
|
||||
final Database db= getDB();
|
||||
db.putInt(record + NUM_PARAMS, params.length);
|
||||
|
@ -225,7 +235,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
throw new PDOMNotImplementedError();
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
try {
|
||||
PDOMLinkage linkage= getLinkage();
|
||||
Database db= getDB();
|
||||
|
@ -233,7 +243,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
IType[] ptypes= ft == null ? IType.EMPTY_TYPE_ARRAY : ft.getParameterTypes();
|
||||
|
||||
int n = db.getInt(record + NUM_PARAMS);
|
||||
IParameter[] result = new IParameter[n];
|
||||
ICPPParameter[] result = new ICPPParameter[n];
|
||||
|
||||
long next = db.getRecPtr(record + FIRST_PARAM);
|
||||
for (int i = 0; i < n && next != 0; i++) {
|
||||
|
@ -245,7 +255,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
return result;
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
return IParameter.EMPTY_PARAMETER_ARRAY;
|
||||
return ICPPParameter.EMPTY_CPPPARAMETER_ARRAY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
||||
import org.eclipse.cdt.internal.core.Util;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
|
||||
|
@ -84,7 +85,7 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization implements ICP
|
|||
}
|
||||
|
||||
ICPPFunction spAstFunc= (ICPPFunction) ((ICPPSpecialization)astFunction).getSpecializedBinding();
|
||||
IParameter[] spAstParams= spAstFunc.getParameters();
|
||||
ICPPParameter[] spAstParams= spAstFunc.getParameters();
|
||||
|
||||
final int length= Math.min(spAstParams.length, astParams.length);
|
||||
db.putInt(record + NUM_PARAMS, length);
|
||||
|
@ -140,7 +141,7 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization implements ICP
|
|||
throw new PDOMNotImplementedError();
|
||||
}
|
||||
|
||||
public IParameter[] getParameters() throws DOMException {
|
||||
public ICPPParameter[] getParameters() throws DOMException {
|
||||
try {
|
||||
PDOMLinkage linkage= getLinkage();
|
||||
Database db= getDB();
|
||||
|
@ -148,7 +149,7 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization implements ICP
|
|||
IType[] ptypes= ft == null ? IType.EMPTY_TYPE_ARRAY : ft.getParameterTypes();
|
||||
|
||||
int n = db.getInt(record + NUM_PARAMS);
|
||||
IParameter[] result = new IParameter[n];
|
||||
ICPPParameter[] result = new ICPPParameter[n];
|
||||
|
||||
long next = db.getRecPtr(record + FIRST_PARAM);
|
||||
for (int i = 0; i < n && next != 0; i++) {
|
||||
|
@ -160,7 +161,7 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization implements ICP
|
|||
return result;
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
return new IParameter[0];
|
||||
return ICPPParameter.EMPTY_CPPPARAMETER_ARRAY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
||||
|
@ -181,7 +182,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
private final IPDOMCPPTemplateParameter[] fTemplateParameters;
|
||||
private final ICPPTemplateParameter[] fOriginalTemplateParameters;
|
||||
private final ICPPFunctionType fOriginalFunctionType;
|
||||
private final IParameter[] fOriginalParameters;
|
||||
private final ICPPParameter[] fOriginalParameters;
|
||||
private final IType[] fOriginalExceptionSpec;
|
||||
|
||||
public ConfigureFunctionTemplate(ICPPFunctionTemplate original, PDOMCPPFunctionTemplate template) throws DOMException {
|
||||
|
|
|
@ -14,11 +14,11 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.IValue;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.index.IIndexFile;
|
||||
import org.eclipse.cdt.core.parser.util.CharArrayUtils;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragment;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexScope;
|
||||
|
@ -53,34 +53,39 @@ class PDOMCPPParameter extends PDOMNamedNode implements ICPPParameter, IPDOMBind
|
|||
fType= type;
|
||||
}
|
||||
|
||||
public PDOMCPPParameter(PDOMLinkage linkage, PDOMNode parent, IParameter param, PDOMCPPParameter next)
|
||||
public PDOMCPPParameter(PDOMLinkage linkage, PDOMNode parent, ICPPParameter param, PDOMCPPParameter next)
|
||||
throws CoreException {
|
||||
super(linkage, parent, param.getNameCharArray());
|
||||
fType= null; // this constructor is used for adding parameters to the database, only.
|
||||
|
||||
Database db = getDB();
|
||||
|
||||
db.putRecPtr(record + NEXT_PARAM, 0);
|
||||
byte flags= encodeFlags(param);
|
||||
db.putByte(record + FLAGS, flags);
|
||||
db.putByte(record + FLAGS, param.hasDefaultValue() ? FLAG_DEFAULT_VALUE : 0);
|
||||
db.putRecPtr(record + NEXT_PARAM, next == null ? 0 : next.getRecord());
|
||||
|
||||
storeAnnotations(db, param);
|
||||
}
|
||||
|
||||
private void storeAnnotations(Database db, ICPPParameter param) throws CoreException {
|
||||
try {
|
||||
byte annotations = PDOMCPPAnnotation.encodeAnnotation(param);
|
||||
db.putByte(record + ANNOTATIONS, annotations);
|
||||
} catch (DOMException e) {
|
||||
// ignore and miss out on some properties of the parameter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private byte encodeFlags(IParameter param) {
|
||||
byte flags= 0;
|
||||
if (param instanceof ICPPParameter &&
|
||||
((ICPPParameter) param).hasDefaultValue()) {
|
||||
flags |= FLAG_DEFAULT_VALUE;
|
||||
public void update(ICPPParameter newPar) throws CoreException {
|
||||
final Database db = getDB();
|
||||
// Bug 297438: Don't clear the property of having a default value.
|
||||
if (newPar.hasDefaultValue()) {
|
||||
db.putByte(record + FLAGS, FLAG_DEFAULT_VALUE);
|
||||
}
|
||||
storeAnnotations(db, newPar);
|
||||
|
||||
final char[] newName = newPar.getNameCharArray();
|
||||
if (!CharArrayUtils.equals(newName, getNameCharArray())) {
|
||||
updateName(newName);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,15 +99,15 @@ class PDOMCPPParameter extends PDOMNamedNode implements ICPPParameter, IPDOMBind
|
|||
}
|
||||
|
||||
public String[] getQualifiedName() {
|
||||
throw new PDOMNotImplementedError();
|
||||
return new String[] {getName()};
|
||||
}
|
||||
|
||||
public char[][] getQualifiedNameCharArray() throws DOMException {
|
||||
throw new PDOMNotImplementedError();
|
||||
return new char[][]{getNameCharArray()};
|
||||
}
|
||||
|
||||
public boolean isGloballyQualified() throws DOMException {
|
||||
throw new PDOMNotImplementedError();
|
||||
public boolean isGloballyQualified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isMutable() throws DOMException {
|
||||
|
@ -148,7 +153,7 @@ class PDOMCPPParameter extends PDOMNamedNode implements ICPPParameter, IPDOMBind
|
|||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Object getAdapter(Class adapter) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -588,7 +588,7 @@ class OpenDeclarationsJob extends Job implements ASTRunnable {
|
|||
try {
|
||||
IBinding b= astName.resolveBinding();
|
||||
if (b != null && !(b instanceof IProblemBinding)) {
|
||||
if (primaryBindings.add(b)) {
|
||||
if (!ignoreIndexBindings.contains(b) && primaryBindings.add(b)) {
|
||||
ignoreIndexBindings.add(fIndex.adaptBinding(b));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue