mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 398459 - Invalid auto-indentation in a virtual method
This commit is contained in:
parent
98e5959c90
commit
adb89806d8
2 changed files with 12 additions and 3 deletions
|
@ -432,7 +432,7 @@ public class CIndenterTest extends BaseUITestCase {
|
||||||
//class MyClass {
|
//class MyClass {
|
||||||
//typedef int MyType;
|
//typedef int MyType;
|
||||||
//public:
|
//public:
|
||||||
//int getA() {
|
//virtual int getA() {
|
||||||
//return a;
|
//return a;
|
||||||
//}
|
//}
|
||||||
//MyClass();
|
//MyClass();
|
||||||
|
@ -444,7 +444,7 @@ public class CIndenterTest extends BaseUITestCase {
|
||||||
//class MyClass {
|
//class MyClass {
|
||||||
// typedef int MyType;
|
// typedef int MyType;
|
||||||
// public:
|
// public:
|
||||||
// int getA() {
|
// virtual int getA() {
|
||||||
// return a;
|
// return a;
|
||||||
// }
|
// }
|
||||||
// MyClass();
|
// MyClass();
|
||||||
|
|
|
@ -1409,8 +1409,17 @@ public final class CIndenter {
|
||||||
case Symbols.TokenPRIVATE:
|
case Symbols.TokenPRIVATE:
|
||||||
case Symbols.TokenPROTECTED:
|
case Symbols.TokenPROTECTED:
|
||||||
case Symbols.TokenPUBLIC:
|
case Symbols.TokenPUBLIC:
|
||||||
case Symbols.TokenVIRTUAL:
|
|
||||||
continue; // Don't stop at colon in a class declaration
|
continue; // Don't stop at colon in a class declaration
|
||||||
|
|
||||||
|
case Symbols.TokenVIRTUAL:
|
||||||
|
switch (peekToken()) {
|
||||||
|
case Symbols.TokenPRIVATE:
|
||||||
|
case Symbols.TokenPROTECTED:
|
||||||
|
case Symbols.TokenPUBLIC:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int pos= fPreviousPos;
|
int pos= fPreviousPos;
|
||||||
if (!isConditional())
|
if (!isConditional())
|
||||||
|
|
Loading…
Add table
Reference in a new issue