Ignore:
Timestamp:
Aug 11, 2017, 10:10:26 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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
Message:

Fix concurrency library, tests, and keywords for references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    r8499c707 r83a071f9  
    291291                        LinkageSpec::Cforall,
    292292                        nullptr,
    293                         new PointerType(
     293                        new ReferenceType(
    294294                                noQualifiers,
    295295                                new StructInstType(
     
    447447
    448448                //Makes sure it's not a copy
    449                 PointerType* pty = dynamic_cast< PointerType * >( ty );
    450449                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 );
    452451
    453452                //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 );
    456456
    457457                //Make sure that typed isn't mutex
Note: See TracChangeset for help on using the changeset viewer.