Changeset 5c69a1e


Ignore:
Timestamp:
May 26, 2017, 5:48:07 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
38bfe05b
Parents:
736fe25 (diff), 65f9dec (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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r736fe25 r5c69a1e  
    2828                wrap([$class: 'TimestamperBuildWrapper']) {
    2929
    30                         notify_server()
     30                        notify_server(1)
    3131
    3232                        prepare_build()
     
    4646                        publish()
    4747
    48                         notify_server()
     48                        notify_server(45)
    4949                }
    5050        }
     
    171171}
    172172
    173 def notify_server() {
    174         sh 'curl --silent -X POST http://plg2:8082/jenkins/notify > /dev/null || true'
     173def notify_server(int wait) {
     174        sh """curl --silent --data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true"""
    175175        return
    176176}
  • src/SymTab/Indexer.cc

    r736fe25 r5c69a1e  
    124124                        };
    125125                        // properties for this type
    126                         bool userDefinedFunc = false; // any user-defined function found
    127                         bool userDefinedCtor = false; // any user-defined constructor found
    128                         bool userDefinedDtor = false; // any user-defined destructor found
    129                         bool userDefinedCopyFunc = false; // user-defined copy ctor found
     126                        bool existsUserDefinedFunc = false;    // any user-defined function found
     127                        bool existsUserDefinedCtor = false;    // any user-defined constructor found
     128                        bool existsUserDefinedDtor = false;    // any user-defined destructor found
     129                        bool existsUserDefinedCopyFunc = false;    // user-defined copy ctor found
     130                        bool existsUserDefinedDefaultCtor = false; // user-defined default ctor found
    130131                        std::list< DeclBall > decls;
    131132
     
    138139                                bool isCopyFunc = InitTweak::isCopyFunction( function, function->get_name() );
    139140                                decls.push_back( DeclBall{ function, isUserDefinedFunc, isDefaultCtor, isDtor, isCopyFunc } );
    140                                 userDefinedFunc = userDefinedFunc || isUserDefinedFunc;
    141                                 userDefinedCtor = userDefinedCtor || (isUserDefinedFunc && InitTweak::isConstructor( function->get_name() ) );
    142                                 userDefinedDtor = userDefinedDtor || (isUserDefinedFunc && isDtor);
    143                                 userDefinedCopyFunc = userDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc);
     141                                existsUserDefinedFunc = existsUserDefinedFunc || isUserDefinedFunc;
     142                                existsUserDefinedCtor = existsUserDefinedCtor || (isUserDefinedFunc && InitTweak::isConstructor( function->get_name() ) );
     143                                existsUserDefinedDtor = existsUserDefinedDtor || (isUserDefinedFunc && isDtor);
     144                                existsUserDefinedCopyFunc = existsUserDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc);
     145                                existsUserDefinedDefaultCtor = existsUserDefinedDefaultCtor || (isUserDefinedFunc && isDefaultCtor);
    144146                                return *this;
    145147                        }
     
    163165                }
    164166
    165                 // if a type contains user defined ctor/dtors, then special rules trigger, which determine
    166                 // the set of ctor/dtors that are seen by the requester. In particular, if the user defines
     167                // if a type contains user defined ctor/dtor/assign, then special rules trigger, which determine
     168                // the set of ctor/dtor/assign that are seen by the requester. In particular, if the user defines
    167169                // a default ctor, then the generated default ctor should never be seen, likewise for copy ctor
    168170                // and dtor. If the user defines any ctor/dtor, then no generated field ctors should be seen.
    169                 // If the user defines any ctor then the generated default ctor should not be seen.
     171                // If the user defines any ctor then the generated default ctor should not be seen (intrinsic default
     172                // ctor must be overridden exactly).
    170173                for ( std::pair< const std::string, ValueType > & pair : funcMap ) {
    171174                        ValueType & val = pair.second;
    172175                        for ( ValueType::DeclBall ball : val.decls ) {
    173                                 if ( ! val.userDefinedFunc || ball.isUserDefinedFunc || (! val.userDefinedCtor && ball.isDefaultCtor) || (! val.userDefinedCopyFunc && ball.isCopyFunc) || (! val.userDefinedDtor && ball.isDtor) ) {
     176                                bool noUserDefinedFunc = ! val.existsUserDefinedFunc;
     177                                bool isUserDefinedFunc = ball.isUserDefinedFunc;
     178                                bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl->get_linkage() == LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides
     179                                bool isAcceptableCopyFunc = ! val.existsUserDefinedCopyFunc && ball.isCopyFunc; // handles copy ctor and assignment operator
     180                                bool isAcceptableDtor = ! val.existsUserDefinedDtor && ball.isDtor;
     181                                if ( noUserDefinedFunc || isUserDefinedFunc || isAcceptableDefaultCtor || isAcceptableCopyFunc || isAcceptableDtor ) {
    174182                                        // decl conforms to the rules described above, so it should be seen by the requester
    175183                                        out.push_back( ball.decl );
Note: See TracChangeset for help on using the changeset viewer.