Ignore:
Timestamp:
Feb 15, 2018, 3:58:56 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
75e3cb2
Parents:
d27e340
Message:

Massive change to errors to enable warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    rd27e340 rd55d7a6  
    141141                        base = at->get_base();
    142142                        memberIter = createMemberIterator( base );
    143                         if ( at->isVarLen ) throw SemanticError( "VLA initialization does not support @=", at );
     143                        if ( at->isVarLen ) throw SemanticError( at, "VLA initialization does not support @=" );
    144144                        setSize( at->get_dimension() );
    145145                }
     
    156156                                        PRINT( std::cerr << "array type with size: " << size << std::endl; )
    157157                                } catch ( SemanticError & ) {
    158                                         throw SemanticError( "Constant expression of non-integral type in array dimension: ", expr );
     158                                        throw SemanticError( expr, "Constant expression of non-integral type in array dimension: " );
    159159                                }
    160160                        }       else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
     
    179179                                        index = constExpr->intValue();
    180180                                } catch( SemanticError & ) {
    181                                         throw SemanticError( "Constant expression of non-integral type in array designator: ", expr );
     181                                        throw SemanticError( expr, "Constant expression of non-integral type in array designator: " );
    182182                                }
    183183                        } else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
     
    532532                } // for
    533533                if ( desigAlts.size() > 1 ) {
    534                         throw SemanticError( toString("Too many alternatives (", desigAlts.size(), ") for designation: "), designation );
     534                        throw SemanticError( designation, toString("Too many alternatives (", desigAlts.size(), ") for designation: ") );
    535535                } else if ( desigAlts.size() == 0 ) {
    536                         throw SemanticError( "No reasonable alternatives for designation: ", designation );
     536                        throw SemanticError( designation, "No reasonable alternatives for designation: " );
    537537                }
    538538                DesignatorChain & d = desigAlts.back();
Note: See TracChangeset for help on using the changeset viewer.