Changes in src/AST/Create.cpp [14c0f7b:8f06277]
- File:
-
- 1 edited
-
src/AST/Create.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Create.cpp
r14c0f7b r8f06277 42 42 return nullptr; 43 43 } 44 // The cast and changing the original should be safe as long as the 45 // change is reverted before anything else sees it. It's also faster. 46 FunctionDecl * mutDecl = const_cast<FunctionDecl *>( decl ); 47 CompoundStmt const * stmts = mutDecl->stmts.release(); 48 FunctionDecl * copy = deepCopy( mutDecl ); 49 mutDecl->stmts = stmts; 50 return copy; 44 return new ast::FunctionDecl( decl->location, 45 decl->name, 46 vectorCopy( decl->type_params ), 47 vectorCopy( decl->assertions ), 48 vectorCopy( decl->params ), 49 vectorCopy( decl->returns ), 50 nullptr, 51 decl->storage, 52 decl->linkage, 53 vectorCopy( decl->attributes ), 54 decl->funcSpec, 55 decl->type->isVarArgs 56 ); 51 57 } 52 58
Note:
See TracChangeset
for help on using the changeset viewer.