Ignore:
Timestamp:
Sep 20, 2022, 8:37:05 PM (22 months ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
a065f1f
Parents:
d489da8 (diff), 12df6fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge to Master Sept 19

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    rd489da8 r4520b77e  
    864864                }
    865865
     866                void postvisit( const ast::QualifiedNameExpr * qualifiedNameExpr ) {
     867                        auto mangleName = Mangle::mangle(qualifiedNameExpr->var);
     868                        addCandidate( qualifiedNameExpr, tenv );
     869                }
     870
    866871                void postvisit( const ast::UntypedExpr * untypedExpr ) {
    867872                        std::vector< CandidateFinder > argCandidates =
     
    897902                                                }
    898903
    899                                                 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);
    900                                                 else if (const ast::EnumInstType * enumInst = argType.as<ast::EnumInstType>()) {
    901                                                         const ast::EnumDecl * enumDecl = enumInst->base;
    902                                                         if ( const ast::Type* enumType = enumDecl->base ) {
    903                                                                 // instance of enum (T) is a instance of type (T)
    904                                                                 funcFinder.otypeKeys.insert(Mangle::mangle(enumType, Mangle::NoGenericParams | Mangle::Type));
    905                                                         } else {
    906                                                                 // instance of an untyped enum is techically int
    907                                                                 funcFinder.otypeKeys.insert(Mangle::mangle(enumDecl, Mangle::NoGenericParams | Mangle::Type));
    908                                                         }
    909                                                 }
     904                                                if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);                                             
     905                                                // else if (const ast::EnumInstType * enumInst = argType.as<ast::EnumInstType>()) {
     906                                                //      const ast::EnumDecl * enumDecl = enumInst->base; // Here
     907                                                //      if ( const ast::Type* enumType = enumDecl->base ) {
     908                                                //              // instance of enum (T) is a instance of type (T)
     909                                                //              funcFinder.otypeKeys.insert(Mangle::mangle(enumType, Mangle::NoGenericParams | Mangle::Type));
     910                                                //      } else {
     911                                                //              // instance of an untyped enum is techically int
     912                                                //              funcFinder.otypeKeys.insert(Mangle::mangle(enumDecl, Mangle::NoGenericParams | Mangle::Type));
     913                                                //      }
     914                                                // }
    910915                                                else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type));
    911916                                        }
Note: See TracChangeset for help on using the changeset viewer.