Ignore:
Timestamp:
Mar 16, 2022, 4:41:01 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
f7496c5
Parents:
9d8124f
Message:

Thread global information through resolution. Non-top-level calls to the resolver have a bit of a hack but improvements would require changes to the Pass helpers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidatePrinter.cpp

    r9d8124f r39d8950  
    1010// Created On       : Tue Nov  9  9:54:00 2021
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Nov  9 15:47:00 2021
    13 // Update Count     : 0
     12// Last Modified On : Wed Mar 16 13:56:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    2222#include "AST/TranslationUnit.hpp"
    2323#include "ResolvExpr/CandidateFinder.hpp"
     24#include "ResolvExpr/Resolver.h"
    2425
    2526#include <iostream>
     
    2930namespace {
    3031
    31 class CandidatePrintCore : public ast::WithSymbolTable {
     32class CandidatePrintCore : public ast::WithSymbolTable,
     33                public ast::WithConstTranslationUnit {
    3234        std::ostream & os;
    3335public:
     
    3638        void postvisit( const ast::ExprStmt * stmt ) {
    3739                ast::TypeEnvironment env;
    38                 CandidateFinder finder( symtab, env );
     40                CandidateFinder finder( { symtab, transUnit().global }, env );
    3941                finder.find( stmt->expr, ResolvMode::withAdjustment() );
    4042                int count = 1;
Note: See TracChangeset for help on using the changeset viewer.