Changeset a25f64b


Ignore:
Timestamp:
Dec 2, 2020, 12:11:01 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
833ba13, f0d67e5
Parents:
2b2f59d (diff), 4a8f150 (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 plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInitNew.cpp

    r2b2f59d ra25f64b  
    413413        void SelfAssignChecker::previsit( const ast::ApplicationExpr * appExpr ) {
    414414                auto function = getFunction( appExpr );
    415                 if ( function->name == "?=?" ) { // doesn't use isAssignment, because ?+=?, etc. should not count as self-assignment
    416                         if ( appExpr->args.size() == 2 ) {
    417                                 // check for structural similarity (same variable use, ignore casts, etc. - but does not look too deeply, anything looking like a function is off limits)
    418                                 if ( structurallySimilar( appExpr->args.front(), appExpr->args.back() ) ) {
    419                                         SemanticWarning( appExpr->location, Warning::SelfAssignment, toCString( appExpr->args.front() ) );
    420                                 }
    421                         }
     415                // Doesn't use isAssignment, because ?+=?, etc. should not count as self-assignment.
     416                if ( function->name == "?=?" && appExpr->args.size() == 2
     417                                // Check for structural similarity (same variable use, ignore casts, etc.
     418                                // (but does not look too deeply, anything looking like a function is off limits).
     419                                && structurallySimilar( appExpr->args.front(), appExpr->args.back() ) ) {
     420                        SemanticWarning( appExpr->location, Warning::SelfAssignment, toCString( appExpr->args.front() ) );
    422421                }
    423422        }
  • src/ResolvExpr/Resolver.cc

    r2b2f59d ra25f64b  
    14711471                                auto newDecl = fixObjectType(objectDecl, symtab);
    14721472                                auto mutDecl = mutate(newDecl);
    1473                                
     1473
    14741474                                // generate CtorInit wrapper when necessary.
    14751475                                // in certain cases, fixObjectType is called before reaching
     
    14891489                        currentObject = ast::CurrentObject{ objectDecl->location, objectDecl->get_type() };
    14901490                }
    1491                
     1491
    14921492                return objectDecl;
    14931493        }
  • src/main.cc

    r2b2f59d ra25f64b  
    99// Author           : Peter Buhr and Rob Schluntz
    1010// Created On       : Fri May 15 23:12:02 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Oct  8 18:17:46 2020
    13 // Update Count     : 637
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tue Dec  1 14:52:00 2020
     13// Update Count     : 638
    1414//
    1515
     
    340340                } // if
    341341
    342                 if( useNewAST) {
     342                if( useNewAST ) {
    343343                        if (Stats::Counters::enabled) {
    344344                                ast::pass_visitor_stats.avg = Stats::Counters::build<Stats::Counters::AverageCounter<double>>("Average Depth - New");
     
    352352                                return EXIT_SUCCESS;
    353353                        } // if
     354
     355                        // TODO: This is a quick fix to get the build working.
     356                        // Get rid of fillLocations or at least make a new-ast version.
     357                        translationUnit = convert( move( transUnit ) );
     358                        CodeTools::fillLocations( translationUnit );
     359                        transUnit = convert( move( translationUnit ) );
    354360
    355361                        PASS( "Fix Init", InitTweak::fix(transUnit, buildingLibrary()));
Note: See TracChangeset for help on using the changeset viewer.