File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1401,8 +1401,19 @@ public override bool VisitProperty(Property property)
14011401 WriteLine ( $ "_S->{ fieldName } = static_cast<AST::{ typeName } >(" +
14021402 $ "WalkStatement(S->{ methodName } ()));") ;
14031403 else if ( typeName . Contains ( "Expr" ) )
1404- WriteLine ( $ "_S->{ fieldName } = static_cast<AST::{ typeName } >(" +
1405- $ "WalkExpression(S->{ methodName } ()));") ;
1404+ {
1405+ var expr = $ "_S->{ fieldName } = static_cast<AST::{ typeName } >(WalkExpression(S->{ methodName } ()));";
1406+
1407+ if ( fieldName == "base" )
1408+ {
1409+ WriteLine ( "if (!S->isImplicitAccess())" ) ;
1410+ WriteLineIndent ( expr ) ;
1411+ }
1412+ else
1413+ {
1414+ WriteLine ( expr ) ;
1415+ }
1416+ }
14061417 else if ( fieldName == "guidDecl" )
14071418 WriteLine ( $ "_S->{ fieldName } = S->getGuidDecl()->getNameAsString();") ;
14081419 else if ( typeName . Contains ( "Decl" ) || typeName . Contains ( "Method" ) ||
Original file line number Diff line number Diff line change @@ -2426,7 +2426,8 @@ AST::Expr* Parser::WalkExpression(const clang::Expr* Expr)
24262426 _S->refersToMatrixElement = S->refersToMatrixElement ();
24272427 _S->hasPlaceholderType = S->hasPlaceholderType ();
24282428 _S->isImplicitAccess = S->isImplicitAccess ();
2429- _S->base = static_cast <AST::Expr*>(WalkExpression (S->getBase ()));
2429+ if (!S->isImplicitAccess ())
2430+ _S->base = static_cast <AST::Expr*>(WalkExpression (S->getBase ()));
24302431 _S->baseType = GetQualifiedType (S->getBaseType ());
24312432 _S->isArrow = S->isArrow ();
24322433 _S->firstQualifierFoundInScope = static_cast <AST::Declaration*>(WalkDeclaration (S->getFirstQualifierFoundInScope ()));
You can’t perform that action at this time.
0 commit comments