mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 315435 Fix the regression test failures in cdt70 for John Liu
This commit is contained in:
parent
9697941eec
commit
b4271a2cb3
2 changed files with 7 additions and 4 deletions
|
@ -2129,7 +2129,7 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// class Other {
|
// class Other {
|
||||||
// void m();
|
// void m(); };
|
||||||
// class A {
|
// class A {
|
||||||
// friend void set();
|
// friend void set();
|
||||||
// friend void Other::m();
|
// friend void Other::m();
|
||||||
|
@ -5593,7 +5593,7 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
// void foo/*_d*/(unsigned short x) {}
|
// void foo/*_d*/(unsigned short x) {}
|
||||||
// void foo/*_e*/(long x) {}
|
// void foo/*_e*/(long x) {}
|
||||||
// void foo/*_f*/(unsigned long x) {}
|
// void foo/*_f*/(unsigned long x) {}
|
||||||
// void foo/*_g*/(long long x) {}
|
// void foo/*_g*/(long long g) {}
|
||||||
// void foo/*_h*/(unsigned long long x) {}
|
// void foo/*_h*/(unsigned long long x) {}
|
||||||
// void foo/*_i*/(float x) {}
|
// void foo/*_i*/(float x) {}
|
||||||
// void foo/*_j*/(double x) {}
|
// void foo/*_j*/(double x) {}
|
||||||
|
|
|
@ -201,12 +201,15 @@ public class CPPASTConstructorChainInitializer extends ASTNode implements
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setInitializerValue(IASTExpression expression) {
|
public void setInitializerValue(IASTExpression expression) {
|
||||||
assertNotFrozen();
|
assertNotFrozen();
|
||||||
|
//CDT_70_FIX_FROM_50-#6
|
||||||
|
CPPASTConstructorInitializer ctorInit= new CPPASTConstructorInitializer();
|
||||||
if (expression == null) {
|
if (expression == null) {
|
||||||
setInitializer(null);
|
//add an empty initializer, fix test testBug89539 for xlc parser
|
||||||
|
setInitializer(ctorInit);
|
||||||
} else if (expression instanceof IASTInitializer) {
|
} else if (expression instanceof IASTInitializer) {
|
||||||
setInitializer((IASTInitializer) expression);
|
setInitializer((IASTInitializer) expression);
|
||||||
} else {
|
} else {
|
||||||
CPPASTConstructorInitializer ctorInit= new CPPASTConstructorInitializer();
|
|
||||||
ctorInit.setExpression(expression);
|
ctorInit.setExpression(expression);
|
||||||
ctorInit.setOffsetAndLength((ASTNode) expression);
|
ctorInit.setOffsetAndLength((ASTNode) expression);
|
||||||
setInitializer(ctorInit);
|
setInitializer(ctorInit);
|
||||||
|
|
Loading…
Add table
Reference in a new issue