mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
224364: re-enable fix after performance improvements from Markus
This commit is contained in:
parent
98cf46261c
commit
080b701f7d
5 changed files with 4 additions and 22 deletions
|
@ -1291,7 +1291,7 @@ public abstract class IndexCPPBindingResolutionTest extends IndexBindingResoluti
|
|||
// E e;
|
||||
// foo(e);
|
||||
// }
|
||||
public void _testUserDefinedConversionOperator_224364() throws Exception {
|
||||
public void testUserDefinedConversionOperator_224364() throws Exception {
|
||||
IBinding ca= getBindingFromASTName("C c;", 1);
|
||||
assertInstance(ca, ICPPClassType.class);
|
||||
|
||||
|
|
|
@ -1022,7 +1022,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa
|
|||
// C<X> cx;
|
||||
// foo(cx);
|
||||
// }
|
||||
public void _testUserDefinedConversionOperator_224364() throws Exception {
|
||||
public void testUserDefinedConversionOperator_224364() throws Exception {
|
||||
IBinding ca= getBindingFromASTName("C<A>", 4);
|
||||
assertInstance(ca, ICPPClassType.class);
|
||||
assertInstance(ca, ICPPTemplateInstance.class);
|
||||
|
|
|
@ -41,10 +41,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassInstance;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassTemplate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
|
@ -389,16 +385,9 @@ public class Conversions {
|
|||
}
|
||||
}
|
||||
|
||||
boolean checkConversionOperators=
|
||||
(SemanticUtil.ENABLE_224364 && s instanceof ICPPClassType)
|
||||
|| (s instanceof CPPClassType
|
||||
|| s instanceof CPPClassTemplate
|
||||
|| s instanceof CPPClassSpecialization
|
||||
|| s instanceof CPPClassInstance);
|
||||
|
||||
//conversion operators
|
||||
boolean ambiguousConversionOperator= false;
|
||||
if (checkConversionOperators) {
|
||||
if (s instanceof ICPPClassType) {
|
||||
ICPPMethod [] ops = SemanticUtil.getConversionOperators((ICPPClassType)s);
|
||||
if (ops.length > 0 && ops[0] instanceof IProblemBinding == false) {
|
||||
for (final ICPPMethod op : ops) {
|
||||
|
|
|
@ -42,11 +42,6 @@ public class SemanticUtil {
|
|||
*/
|
||||
private static final CharArraySet cas= new CharArraySet(OverloadableOperator.values().length);
|
||||
|
||||
/**
|
||||
* Switch for enabling fix for bug 224364
|
||||
*/
|
||||
public static final boolean ENABLE_224364= System.getProperty("cdt.enable.224364") != null; //$NON-NLS-1$
|
||||
|
||||
static {
|
||||
final int OPERATOR_SPC= OPERATOR_CHARS.length + 1;
|
||||
for(OverloadableOperator op : OverloadableOperator.values()) {
|
||||
|
|
|
@ -260,10 +260,8 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
|| pdomBinding instanceof PDOMCPPDeferredClassInstance)) {
|
||||
// Add instantiated constructors to the index (bug 201174).
|
||||
addConstructors(pdomBinding, (ICPPClassType) binding);
|
||||
if(SemanticUtil.ENABLE_224364) {
|
||||
addConversionOperators(pdomBinding, (ICPPClassType) binding);
|
||||
}
|
||||
}
|
||||
} catch (DOMException e) {
|
||||
throw new CoreException(Util.createStatus(e));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue