mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 321069 ASTWriter fails on IASTDeclarators with nested declarators, patch from Tomasz Wesolowski
This commit is contained in:
parent
69665fb352
commit
43fc6eaaac
2 changed files with 15 additions and 0 deletions
|
@ -92,6 +92,20 @@ int b, a;
|
|||
}
|
||||
|
||||
|
||||
//!ICPPASTDeclarator with nested declarator being a variable
|
||||
//%C
|
||||
int *(*var[3]);
|
||||
|
||||
//!ICPPASTDeclarator with nested declarator and redundant parentheses
|
||||
//%C
|
||||
char (*((*fptr))(int, char));
|
||||
|
||||
//!ICPPASTDeclarator with nested declarator as a method
|
||||
//%CPP
|
||||
class Foo
|
||||
{
|
||||
int (*(*aMethod())[2]);
|
||||
};
|
||||
//!ICPPASTReferenceOperator rvalue reference
|
||||
//%CPP
|
||||
int && foo(int && a)
|
||||
|
|
|
@ -79,6 +79,7 @@ public class DeclaratorWriter extends NodeWriter {
|
|||
writePointerOperators(declarator, pointOps);
|
||||
IASTName name = declarator.getName();
|
||||
name.accept(visitor);
|
||||
writeNestedDeclarator(declarator);
|
||||
IASTInitializer init = getInitializer(declarator);
|
||||
if(init!= null) {
|
||||
init.accept(visitor);
|
||||
|
|
Loading…
Add table
Reference in a new issue