Changeset bc179fd for src


Ignore:
Timestamp:
Jun 1, 2021, 3:18:40 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
62006a3
Parents:
1f68d5d
Message:

Removed more gcc11 warnings

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Type.hpp

    r1f68d5d rbc179fd  
    402402
    403403        // compact representation used for map lookups.
    404         struct TypeEnvKey { 
    405                 const TypeDecl * base;
    406                 int formal_usage;
    407                 int expr_id;
     404        struct TypeEnvKey {
     405                const TypeDecl * base = nullptr;
     406                int formal_usage = 0;
     407                int expr_id = 0;
    408408
    409409                TypeEnvKey() = default;
     
    440440        const Type * accept( Visitor & v ) const override { return v.visit( this ); }
    441441
    442         std::string typeString() const { 
    443                 if (formal_usage > 0) return std::string("_") + std::to_string(formal_usage) + "_" + std::to_string(expr_id) + "_" + name; 
     442        std::string typeString() const {
     443                if (formal_usage > 0) return std::string("_") + std::to_string(formal_usage) + "_" + std::to_string(expr_id) + "_" + name;
    444444                else return name;
    445445        }
     
    548548                        res = p * res + x.expr_id;
    549549                        return res;
    550                 } 
     550                }
    551551        };
    552552}
  • src/CodeTools/ResolvProtoDump.cc

    r1f68d5d rbc179fd  
    746746                        // print child scopes
    747747                        ++indent;
    748                         for ( const PassVisitor<ProtoDump>& s : subs ) {
     748                        for ( const ProtoDump & s : subs ) {
    749749                                std::cout << tab << '{' << std::endl;
    750                                 s.pass.print( indent );
     750                                s.print( indent );
    751751                                std::cout << tab << '}' << std::endl;
    752752                        }
Note: See TracChangeset for help on using the changeset viewer.