mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Typeid for pointer to member, bug 242197.
This commit is contained in:
parent
8f5fc58783
commit
b03ff9f8d1
2 changed files with 17 additions and 1 deletions
|
@ -5951,5 +5951,18 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
public void testAdjustmentOfParameterTypes_Bug239975() throws Exception {
|
||||
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
||||
}
|
||||
|
||||
|
||||
// class A {
|
||||
// public:
|
||||
// void m(int c);
|
||||
// };
|
||||
//
|
||||
// void test(char c) {
|
||||
// void (A::* ptr2mem)(char);
|
||||
// ptr2mem= reinterpret_cast<void (A::*)(char)>(&A::m);
|
||||
// ptr2mem= (void (A::*)(int))(0);
|
||||
// }
|
||||
public void testTypeIdForPtrToMember_Bug242197() throws Exception {
|
||||
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2766,6 +2766,9 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
|||
}
|
||||
|
||||
identifier= name();
|
||||
if (identifier.getLastToken().getType() == IToken.tCOLONCOLON)
|
||||
throwBacktrack(identifier.getLastToken());
|
||||
|
||||
endOffset= identifier.getLastToken().getEndOffset();
|
||||
encounteredTypename= true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue