Changes in src/GenPoly/Lvalue.cc [0d70e0d:0b73f0c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r0d70e0d r0b73f0c 21 21 #include "Lvalue.h" 22 22 23 #include "InitTweak/InitTweak.h" 23 24 #include "Parser/LinkageSpec.h" // for Spec, isBuiltin, Intrinsic 24 25 #include "ResolvExpr/TypeEnvironment.h" // for AssertionSet, OpenVarSet 25 26 #include "ResolvExpr/Unify.h" // for unify 26 27 #include "ResolvExpr/typeops.h" 27 #include "SymTab/Autogen.h"28 28 #include "SymTab/Indexer.h" // for Indexer 29 29 #include "SynTree/Declaration.h" // for Declaration, FunctionDecl … … 33 33 #include "SynTree/Type.h" // for PointerType, Type, FunctionType 34 34 #include "SynTree/Visitor.h" // for Visitor, acceptAll 35 #include "Validate/FindSpecialDecls.h" // for dereferenceOperator 35 36 36 37 #if 0 … … 44 45 // TODO: fold this into the general createDeref function?? 45 46 Expression * mkDeref( Expression * arg ) { 46 if ( SymTab::dereferenceOperator ) {47 if ( Validate::dereferenceOperator ) { 47 48 // note: reference depth can be arbitrarily deep here, so peel off the outermost pointer/reference, not just pointer because they are effecitvely equivalent in this pass 48 VariableExpr * deref = new VariableExpr( SymTab::dereferenceOperator );49 VariableExpr * deref = new VariableExpr( Validate::dereferenceOperator ); 49 50 deref->result = new PointerType( Type::Qualifiers(), deref->result ); 50 51 Type * base = InitTweak::getPointerBase( arg->result ); … … 195 196 unsigned int i = 0; 196 197 const unsigned int end = ftype->parameters.size(); 198 199 /// The for loop may eagerly dereference the iterators and fail on empty lists 200 if(i == end) { return appExpr; } 197 201 for ( auto p : unsafe_group_iterate( appExpr->args, ftype->parameters ) ) { 198 202 if (i == end) break; … … 353 357 Type * destType = castExpr->result; 354 358 Type * srcType = castExpr->arg->result; 359 assertf( destType, "Cast to no type in: %s", toCString( castExpr ) ); 360 assertf( srcType, "Cast from no type in: %s", toCString( castExpr ) ); 355 361 int depth1 = destType->referenceDepth(); 356 362 int depth2 = srcType->referenceDepth();
Note: See TracChangeset
for help on using the changeset viewer.