Changes in src/Common/PassVisitor.impl.h [d8893ca:447c356]
- File:
-
- 1 edited
-
src/Common/PassVisitor.impl.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
rd8893ca r447c356 400 400 { 401 401 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 402 // implicit add __func__ identifier as specified in the C manual 6.4.2.2403 static ObjectDecl func(404 "__func__", noStorageClasses, LinkageSpec::C, nullptr,405 new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ), nullptr, true, false ),406 nullptr407 );408 indexerAddId( &func );409 402 maybeAccept_impl( node->type, *this ); 410 403 maybeAccept_impl( node->statements, *this ); … … 425 418 { 426 419 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 427 // implicit add __func__ identifier as specified in the C manual 6.4.2.2428 static ObjectDecl func(429 "__func__", noStorageClasses, LinkageSpec::C, nullptr,430 new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ), nullptr, true, false ),431 nullptr432 );433 indexerAddId( &func );434 420 maybeMutate_impl( node->type, *this ); 435 421 maybeMutate_impl( node->statements, *this ); … … 985 971 } 986 972 987 988 989 //--------------------------------------------------------------------------990 // NullStmt991 template< typename pass_type >992 void PassVisitor< pass_type >::visit( WithStmt * node ) {993 VISIT_START( node );994 maybeAccept_impl( node->exprs, *this );995 {996 // catch statements introduce a level of scope (for the caught exception)997 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );998 indexerAddWith( node );999 maybeAccept_impl( node->stmt, *this );1000 }1001 VISIT_END( node );1002 }1003 1004 template< typename pass_type >1005 Statement * PassVisitor< pass_type >::mutate( WithStmt * node ) {1006 MUTATE_START( node );1007 maybeMutate_impl( node->exprs, *this );1008 {1009 // catch statements introduce a level of scope (for the caught exception)1010 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );1011 indexerAddWith( node );1012 maybeMutate_impl( node->stmt, *this );1013 }1014 MUTATE_END( Statement, node );1015 }1016 1017 973 //-------------------------------------------------------------------------- 1018 974 // NullStmt
Note:
See TracChangeset
for help on using the changeset viewer.