Ignore:
Timestamp:
Sep 1, 2022, 1:27:52 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
12df6fe
Parents:
def751f
Message:

Fix up the QualifiedNameExpr?. It should now work on both old AST and new AST. There are some known bugs to fix so make all-tests will fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/ValidateType.cc

    rdef751f rb0d9ff7  
    8282        void postvisit( QualifiedType * qualType );
    8383
     84        void postvisit( QualifiedNameExpr * qualExpr );
     85
    8486        void postvisit( EnumDecl * enumDecl );
    8587        void postvisit( StructDecl * structDecl );
     
    157159        // linking only makes sense for the 'oldest ancestor' of the qualified type
    158160        qualType->parent->accept( * visitor );
     161}
     162
     163void LinkReferenceToTypes_old::postvisit( QualifiedNameExpr * qualExpr ) {
     164        const EnumDecl * st = local_indexer->lookupEnum( qualExpr->type_decl->name );
     165        qualExpr->type_decl = const_cast<EnumDecl *>(st);
    159166}
    160167
Note: See TracChangeset for help on using the changeset viewer.