Changeset 822332e


Ignore:
Timestamp:
May 30, 2024, 2:36:08 PM (5 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
0f5e8cd
Parents:
91b9e10
Message:

It seems clang uses different scoping rules for the trailing return of a scoped runction declaration. This form seems compatable with clang and gcc. Since I switched over to clang for testing I also cleaned up all errors that clang or gcc mentioned.

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.hpp

    r91b9e10 r822332e  
    352352
    353353        template< typename core_t >
    354         friend auto __pass::make_value_guard( core_t & core, int ) -> decltype( value_guard( core.at_cleanup ) );
     354        friend auto __pass::make_value_guard( core_t & core, int )
     355                -> decltype( __pass::value_guard( core.at_cleanup ) );
    355356public:
    356357
  • src/AST/Pass.proto.hpp

    r91b9e10 r822332e  
    326326template< typename core_t >
    327327static inline auto make_value_guard( core_t & core, int )
    328                 -> decltype( value_guard( core.at_cleanup ) ) {
     328                -> decltype( __pass::value_guard( core.at_cleanup ) ) {
    329329        // Requires guaranteed copy elision:
    330330        return value_guard( core.at_cleanup );
  • src/AST/Print.cpp

    r91b9e10 r822332e  
    103103        }
    104104
    105         static const char* Names[];
    106 
    107105        void print( const std::vector<ast::Label> & labels ) {
    108106                if ( labels.empty() ) return;
  • src/ResolvExpr/CommonType.cpp

    r91b9e10 r822332e  
    353353        ast::AssertionSet & have;
    354354public:
    355         static size_t traceId;
    356355        ast::ptr< ast::Type > result;
    357356
  • src/ResolvExpr/Unify.cpp

    r91b9e10 r822332e  
    274274        void previsit( const ast::Node * ) { visit_children = false; }
    275275
    276         void postvisit( const ast::VoidType * vt) {
    277                 result = dynamic_cast< const ast::VoidType * >( type2 ); 
     276        void postvisit( const ast::VoidType * ) {
     277                result = dynamic_cast< const ast::VoidType * >( type2 );
    278278                        // || tryToUnifyWithEnumValue(vt, type2, tenv, need, have, open, noWiden());
    279279                ;
     
    610610        }
    611611
    612         void postvisit( const ast::VarArgsType * vat) {
     612        void postvisit( const ast::VarArgsType * ) {
    613613                result = dynamic_cast< const ast::VarArgsType * >( type2 );
    614614                        // || tryToUnifyWithEnumValue(vat, type2, tenv, need, have, open, noWiden());
    615615        }
    616616
    617         void postvisit( const ast::ZeroType * zt) {
     617        void postvisit( const ast::ZeroType * ) {
    618618                result = dynamic_cast< const ast::ZeroType * >( type2 );
    619619                        // || tryToUnifyWithEnumValue(zt, type2, tenv, need, have, open, noWiden());
    620620        }
    621621
    622         void postvisit( const ast::OneType * ot) {
     622        void postvisit( const ast::OneType * ) {
    623623                result = dynamic_cast< const ast::OneType * >( type2 );
    624624                        // || tryToUnifyWithEnumValue(ot, type2, tenv, need, have, open, noWiden());
  • src/Tuples/Tuples.hpp

    r91b9e10 r822332e  
    2222#include "AST/Node.hpp"
    2323namespace ResolvExpr {
    24         class CandidateFinder;
     24        struct CandidateFinder;
    2525}
    2626
  • src/Validate/ImplementEnumFunc.cpp

    r91b9e10 r822332e  
    99class EnumAttrFuncGenerator {
    1010        const ast::EnumDecl* decl;
    11         const ast::EnumInstType* instType;
    1211        unsigned int functionNesting;
    1312        ast::Linkage::Spec proto_linkage;
     
    2120        EnumAttrFuncGenerator(
    2221                        const ast::EnumDecl* decl,
    23                         const ast::EnumInstType* instType,
     22                        const ast::EnumInstType*,
    2423                        unsigned int functionNesting )
    2524                : decl(decl),
    26                   instType{instType},
    2725                  functionNesting{functionNesting},
    2826                  proto_linkage{ast::Linkage::Cforall} {}
     
    5048        ast::FunctionDecl* genFromInstanceProto() const;
    5149        ast::FunctionDecl* genInstToInstFuncProto(const char* func) const;
    52         void genFromIntBody(ast::FunctionDecl *) const; 
     50        void genFromIntBody(ast::FunctionDecl *) const;
    5351        void genFromInstanceBody(ast::FunctionDecl *) const;
    5452        void genSuccPredBody(ast::FunctionDecl *, const char *) const;
     
    388386        if (decl->base) genTypedEnumFunction(ast::EnumAttribute::Value);
    389387        genTypedEnumFunction(ast::EnumAttribute::Label);
    390         genTypedEnumFunction(ast::EnumAttribute::Posn); 
     388        genTypedEnumFunction(ast::EnumAttribute::Posn);
    391389}
    392390
Note: See TracChangeset for help on using the changeset viewer.