Changeset 943bfad for src


Ignore:
Timestamp:
Jul 1, 2021, 12:13:36 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1f45c7d, d5f6a14
Parents:
ea593a3
Message:

Fixed several warnings for clang@head

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.cpp

    rea593a3 r943bfad  
    4747        const ast::ParseNode * parse = dynamic_cast<const ast::ParseNode *>( node );
    4848        if ( nullptr == parse ) {
    49                 assertf(nullptr, "%s (no location)", toString(node).c_str());
     49                assertf(false, "%s (no location)", toString(node).c_str());
    5050        } else if ( parse->location.isUnset() ) {
    51                 assertf(nullptr, "%s (unset location)", toString(node).c_str());
     51                assertf(false, "%s (unset location)", toString(node).c_str());
    5252        } else {
    53                 assertf(nullptr, "%s (at %s:%d)", toString(node).c_str(),
     53                assertf(false, "%s (at %s:%d)", toString(node).c_str(),
    5454                        parse->location.filename.c_str(), parse->location.first_line);
    5555        }
  • src/GenPoly/GenPoly.cc

    rea593a3 r943bfad  
    6464                }
    6565
     66                __attribute__((ununsed))
    6667                bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const TyVarMap & tyVars, const ast::TypeSubstitution * env) {
    6768                        for (auto &param : params) {
  • src/ResolvExpr/CandidateFinder.cpp

    rea593a3 r943bfad  
    597597                const ast::SymbolTable & symtab;
    598598        public:
    599                 static size_t traceId;
     599                // static size_t traceId;
    600600                CandidateFinder & selfFinder;
    601601                CandidateList & candidates;
     
    890890                                                        }
    891891                                                }
    892                                                
     892
    893893                                                // if argType is an unbound type parameter, all special functions need to be searched.
    894894                                                if (isUnboundType(argType)) {
     
    11041104                                // unification run for side-effects
    11051105                                unify( toType, cand->expr->result, cand->env, need, have, open, symtab );
    1106                                 Cost thisCost = 
     1106                                Cost thisCost =
    11071107                                        (castExpr->isGenerated == ast::GeneratedFlag::GeneratedCast)
    11081108                            ? conversionCost( cand->expr->result, toType, cand->expr->get_lvalue(), symtab, cand->env )
     
    17291729                                                found->second.ambiguous = true;
    17301730                                        }
    1731                                 } else { 
     1731                                } else {
    17321732                                        // xxx - can satisfyAssertions increase the cost?
    17331733                                        PRINT(
    17341734                                                std::cerr << "cost " << newCand->cost << " loses to "
    17351735                                                        << found->second.candidate->cost << std::endl;
    1736                                         )       
     1736                                        )
    17371737                                }
    17381738                        } else {
     
    18191819                if ( mode.failFast && pruned.empty() ) {
    18201820                        std::ostringstream stream;
    1821                         if (found) {           
     1821                        if (found) {
    18221822                                CandidateList winners = findMinCost( candidates );
    18231823                                stream << "Cannot choose between " << winners.size() << " alternatives for "
  • src/ResolvExpr/Unify.cc

    rea593a3 r943bfad  
    10441044                        }
    10451045
    1046                         return { new ast::TupleType{ std::move(out) } };
     1046                        return new ast::TupleType{ std::move(out) };
    10471047                }
    10481048
  • src/SymTab/Validate.cc

    rea593a3 r943bfad  
    16281628                }
    16291629        };
    1630         */
    16311630
    16321631        /// expand assertions from a trait instance, performing appropriate type variable substitutions
     
    16461645                }
    16471646        }
    1648 
    1649         /*
    16501647
    16511648        /// Associates forward declarations of aggregates with their definitions
  • src/SynTree/AggregateDecl.cc

    rea593a3 r943bfad  
    9292        std::list< Expression * > copy_parameters;
    9393        cloneAll( new_parameters, copy_parameters );
    94         return makeInst( move( copy( copy_parameters ) ) );
     94        return makeInst( copy( copy_parameters ) );
    9595}
    9696
  • src/SynTree/ReferenceToType.cc

    rea593a3 r943bfad  
    207207        Type::print( os, indent );
    208208        os << "instance of " << typeString() << " ";
    209         const auto & name_ = get_name();
    210209        if( deterministic_output && isUnboundType(name) ) os << "[unbound]";
    211210        else os << name;
Note: See TracChangeset for help on using the changeset viewer.