Changeset 83a071f9 for src/Concurrency
- Timestamp:
- Aug 11, 2017, 10:10:26 AM (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:
- fd344aa
- Parents:
- 8499c707
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Concurrency/Keywords.cc ¶
r8499c707 r83a071f9 291 291 LinkageSpec::Cforall, 292 292 nullptr, 293 new PointerType(293 new ReferenceType( 294 294 noQualifiers, 295 295 new StructInstType( … … 447 447 448 448 //Makes sure it's not a copy 449 PointerType* pty = dynamic_cast< PointerType * >( ty );450 449 ReferenceType* rty = dynamic_cast< ReferenceType * >( ty ); 451 if( ! pty && ! rty ) throw SemanticError( "Mutex argument must be of pointer/reference type ", arg );450 if( ! rty ) throw SemanticError( "Mutex argument must be of reference type ", arg ); 452 451 453 452 //Make sure the we are pointing directly to a type 454 Type* base = pty ? pty->get_base() : rty->get_base(); 455 if( dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg ); 453 Type* base = rty->get_base(); 454 if( dynamic_cast< ReferenceType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg ); 455 if( dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg ); 456 456 457 457 //Make sure that typed isn't mutex
Note: See TracChangeset
for help on using the changeset viewer.