Changeset 0db48ca for src/ResolvExpr
- Timestamp:
- Feb 12, 2022, 1:56:44 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- 0ebbca4
- Parents:
- 4708eaa (diff), eb211bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/ResolvExpr
- Files:
-
- 2 edited
-
Resolver.cc (modified) (4 diffs)
-
Resolver.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r4708eaa r0db48ca 1112 1112 } 1113 1113 1114 1114 1115 1115 } // anonymous namespace 1116 1116 /// Establish post-resolver invariants for expressions … … 1158 1158 1159 1159 namespace { 1160 1160 1161 1161 1162 1162 /// resolve `untyped` to the expression whose candidate satisfies `pred` with the … … 1905 1905 1906 1906 clause2.target.args.reserve( clause.target.args.size() ); 1907 const ast::StructDecl * decl_monitor = symtab.lookupStruct( "monitor$" ); 1907 1908 for ( auto arg : argsCandidates.front() ) { 1908 clause2.target.args.emplace_back( std::move( arg->expr ) ); 1909 const auto & loc = stmt->location; 1910 1911 ast::Expr * init = new ast::CastExpr( loc, 1912 new ast::UntypedExpr( loc, 1913 new ast::NameExpr( loc, "get_monitor" ), 1914 { arg->expr } 1915 ), 1916 new ast::PointerType( 1917 new ast::StructInstType( 1918 decl_monitor 1919 ) 1920 ) 1921 ); 1922 1923 clause2.target.args.emplace_back( findSingleExpression( init, symtab ) ); 1909 1924 } 1910 1925 … … 2077 2092 if (auto functionDecl = decl.as<ast::FunctionDecl>()) { 2078 2093 // xxx - can intrinsic gen ever fail? 2079 if (functionDecl->linkage == ast::Linkage::AutoGen) { 2094 if (functionDecl->linkage == ast::Linkage::AutoGen) { 2080 2095 auto mutDecl = mutate(functionDecl); 2081 2096 mutDecl->isDeleted = true; -
src/ResolvExpr/Resolver.h
r4708eaa r0db48ca 35 35 class StmtExpr; 36 36 class SymbolTable; 37 structTranslationUnit;37 class TranslationUnit; 38 38 class Type; 39 39 class TypeEnvironment; … … 72 72 ast::ptr< ast::Init > resolveCtorInit( 73 73 const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab ); 74 /// Resolves a statement expression 74 /// Resolves a statement expression 75 75 const ast::Expr * resolveStmtExpr( 76 76 const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab );
Note:
See TracChangeset
for help on using the changeset viewer.