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)
1401
1401
WriteLine ( $ "_S->{ fieldName } = static_cast<AST::{ typeName } >(" +
1402
1402
$ "WalkStatement(S->{ methodName } ()));") ;
1403
1403
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
+ }
1406
1417
else if ( fieldName == "guidDecl" )
1407
1418
WriteLine ( $ "_S->{ fieldName } = S->getGuidDecl()->getNameAsString();") ;
1408
1419
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)
2426
2426
_S->refersToMatrixElement = S->refersToMatrixElement ();
2427
2427
_S->hasPlaceholderType = S->hasPlaceholderType ();
2428
2428
_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 ()));
2430
2431
_S->baseType = GetQualifiedType (S->getBaseType ());
2431
2432
_S->isArrow = S->isArrow ();
2432
2433
_S->firstQualifierFoundInScope = static_cast <AST::Declaration*>(WalkDeclaration (S->getFirstQualifierFoundInScope ()));
You can’t perform that action at this time.
0 commit comments