Changeset 0508ab3
- Timestamp:
- Jun 20, 2017, 2:02:46 PM (8 years ago)
- 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:
- 4551a6e
- Parents:
- 5e298d7
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/InitTweak/FixInit.cc ¶
r5e298d7 r0508ab3 56 56 typedef std::unordered_map< int, int > UnqCount; 57 57 58 class InsertImplicitCalls {58 class InsertImplicitCalls : public WithTypeSubstitution { 59 59 public: 60 60 /// wrap function application expressions as ImplicitCopyCtorExpr nodes so that it is easy to identify which … … 69 69 // collects environments for relevant nodes 70 70 EnvMap & envMap; 71 TypeSubstitution * env; //Magically populated by the PassVisitor72 71 }; 73 72 … … 192 191 }; 193 192 194 class FixInit {193 class FixInit : public WithStmtsToAdd { 195 194 public: 196 195 /// expand each object declaration to use its constructor after it is declared. … … 200 199 201 200 std::list< Declaration * > staticDtorDecls; 202 std::list< Statement * > stmtsToAddAfter; // found by PassVisitor203 201 }; 204 202 -
TabularUnified src/SymTab/Validate.cc ¶
r5e298d7 r0508ab3 160 160 }; 161 161 162 class ReturnChecker {162 class ReturnChecker : public WithScopes { 163 163 public: 164 164 /// Checks that return statements return nothing if their return type is void … … 167 167 private: 168 168 void previsit( FunctionDecl * functionDecl ); 169 void postvisit( FunctionDecl * functionDecl );170 169 void previsit( ReturnStmt * returnStmt ); 171 170 172 171 typedef std::list< DeclarationWithType * > ReturnVals; 173 172 ReturnVals returnVals; 174 std::stack< ReturnVals > returnValsStack;175 173 }; 176 174 … … 608 606 609 607 void ReturnChecker::previsit( FunctionDecl * functionDecl ) { 610 returnValsStack.push( returnVals );608 GuardValue( returnVals ); 611 609 returnVals = functionDecl->get_functionType()->get_returnVals(); 612 }613 void ReturnChecker::postvisit( __attribute__((unused)) FunctionDecl * functionDecl ) {614 returnVals = returnValsStack.top();615 returnValsStack.pop();616 610 } 617 611
Note: See TracChangeset
for help on using the changeset viewer.