Changeset 3d2b7bc
- Timestamp:
- Mar 28, 2018, 4:46:54 PM (7 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, with_gc
- Children:
- f6e3e34
- Parents:
- b5563e1
- git-author:
- Rob Schluntz <rschlunt@…> (03/28/18 10:35:21)
- git-committer:
- Rob Schluntz <rschlunt@…> (03/28/18 16:46:54)
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/OperatorTable.cc
rb5563e1 r3d2b7bc 79 79 } // namespace 80 80 81 bool operatorLookup( std::string funcName, OperatorInfo &info ) {81 bool operatorLookup( const std::string & funcName, OperatorInfo & info ) { 82 82 static bool init = false; 83 83 if ( ! init ) { … … 100 100 return true; 101 101 } // if 102 } 103 104 bool isOperator( const std::string & funcName ) { 105 OperatorInfo info; 106 return operatorLookup( funcName, info ); 102 107 } 103 108 -
src/CodeGen/OperatorTable.h
rb5563e1 r3d2b7bc 41 41 }; 42 42 43 bool operatorLookup( std::string funcName, OperatorInfo &info ); 43 bool isOperator( const std::string & funcName ); 44 bool operatorLookup( const std::string & funcName, OperatorInfo & info ); 44 45 45 46 bool isConstructor( const std::string & ); -
src/SymTab/Validate.cc
rb5563e1 r3d2b7bc 630 630 forallFixer( pointer->base->forall, object ); 631 631 } // if 632 // ensure that operator names only apply to functions or function pointers 633 if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) { 634 SemanticError( object->location, toCString( "operator ", object->name.c_str(), " is not a function or function pointer." ) ); 635 } 632 636 object->fixUniqueId(); 633 637 } -
src/tests/operators.c
rb5563e1 r3d2b7bc 27 27 a(b); 28 28 a + b; 29 struct accumulator ?+?; // why not, eh?30 a + b;31 29 } 32 30
Note: See TracChangeset
for help on using the changeset viewer.