compiler/resolution/wrappers.cpp
/************************************* | **************************************
*                                                                             *
* copy a formal and make the copy have blank intent. If the formal to copy    *
* has out intent or inout intent, flag the copy to make sure it is a          *
* reference.                                                                  *
*                                                                             *
* If the formal is ref intent, leave it as ref on the wrapper formal.         *
*                                                                             *
************************************** | *************************************/
|
copy a formal and make the copy have blank intent. If the formal to copy
has out intent or inout intent, flag the copy to make sure it is a
reference.

If the formal is ref intent, leave it as ref on the wrapper formal.


| copy a formal and make the copy have blank intent . If the formal to copy has out intent or inout intent flag the copy to make sure it is a reference . If the formal is ref intent leave it as ref on the wrapper formal .
static ArgSymbol* copyFormalForWrapper(ArgSymbol* formal) {
  ArgSymbol* wrapperFormal = formal->copy();
  if (formal->intent == INTENT_OUT ||
      formal->intent == INTENT_INOUT ||
      formal->hasFlag(FLAG_WRAP_WRITTEN_FORMAL)) {
    wrapperFormal->addFlag(FLAG_WRAP_WRITTEN_FORMAL);
  }
  if (formal->intent != INTENT_REF && formal->intent != INTENT_CONST_REF) {
    wrapperFormal->intent = INTENT_BLANK;
  }
  return wrapperFormal;
}
static ArgSymbol * copyFormalForWrapper ( ArgSymbol * formal ) { ArgSymbol * wrapperFormal = formal -> copy ( ) ; if ( formal -> intent == INTENT_OUT || formal -> intent == INTENT_INOUT || formal -> hasFlag ( FLAG_WRAP_WRITTEN_FORMAL ) ) { wrapperFormal -> addFlag ( FLAG_WRAP_WRITTEN_FORMAL ) ; } if ( formal -> intent != INTENT_REF && formal -> intent != INTENT_CONST_REF ) { wrapperFormal -> intent = INTENT_BLANK ; } return wrapperFormal ; }
|
copy a formal and make the copy have blank intent.
| copy a formal and make the copy have blank intent .