Changeset 00a8e19


Ignore:
Timestamp:
Jan 27, 2022, 9:37:26 AM (4 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
enum, forall-pointer-decay, master
Children:
040334e, e21f253
Parents:
bbfe226
Message:

Missed one required file for the validate D changes, I think it was an indirect include.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    rbbfe226 r00a8e19  
    1010// Created On       : Fri May 13 11:26:36 2016
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Nov 19 19:22:00 2021
    13 // Update Count     : 19
     12// Last Modified On : Mon Dec  6 13:21:00 2021
     13// Update Count     : 20
    1414//
    1515
     
    11911191        }
    11921192
    1193         bool isCopyFunction( const ast::FunctionDecl * decl ) {
    1194                 const ast::FunctionType * ftype = decl->type;
    1195                 if ( ftype->params.size() != 2 ) return false;
    1196 
    1197                 const ast::Type * t1 = getPointerBase( ftype->params.front() );
    1198                 if ( ! t1 ) return false;
    1199                 const ast::Type * t2 = ftype->params.back();
    1200 
    1201                 return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable{} );
    1202         }
     1193bool isAssignment( const ast::FunctionDecl * decl ) {
     1194        return isAssignment( decl->name ) && isCopyFunction( decl );
     1195}
     1196
     1197bool isDestructor( const ast::FunctionDecl * decl ) {
     1198        return isDestructor( decl->name );
     1199}
     1200
     1201bool isDefaultConstructor( const ast::FunctionDecl * decl ) {
     1202        return isConstructor( decl->name ) && 1 == decl->params.size();
     1203}
     1204
     1205bool isCopyConstructor( const ast::FunctionDecl * decl ) {
     1206        return isConstructor( decl->name ) && 2 == decl->params.size();
     1207}
     1208
     1209bool isCopyFunction( const ast::FunctionDecl * decl ) {
     1210        const ast::FunctionType * ftype = decl->type;
     1211        if ( ftype->params.size() != 2 ) return false;
     1212
     1213        const ast::Type * t1 = getPointerBase( ftype->params.front() );
     1214        if ( ! t1 ) return false;
     1215        const ast::Type * t2 = ftype->params.back();
     1216
     1217        return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable{} );
     1218}
    12031219
    12041220        const FunctionDecl * isAssignment( const Declaration * decl ) {
  • src/InitTweak/InitTweak.h

    rbbfe226 r00a8e19  
    1010// Created On       : Fri May 13 11:26:36 2016
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Nov 19 14:18:00 2021
    13 // Update Count     : 7
     12// Last Modified On : Mon Dec  6 13:20:00 2021
     13// Update Count     : 8
    1414//
    1515
     
    3131        const FunctionDecl * isCopyConstructor( const Declaration * decl );
    3232        const FunctionDecl * isCopyFunction( const Declaration * decl, const std::string & fname );
     33        bool isAssignment( const ast::FunctionDecl * decl );
     34        bool isDestructor( const ast::FunctionDecl * decl );
     35        bool isDefaultConstructor( const ast::FunctionDecl * decl );
     36        bool isCopyConstructor( const ast::FunctionDecl * decl );
    3337        bool isCopyFunction( const ast::FunctionDecl * decl );
    3438
  • src/Validate/Autogen.cpp

    rbbfe226 r00a8e19  
    1010// Created On       : Thu Dec  2 13:44:00 2021
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jan 26 13:39:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Thr Jan 27  9:29:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    3636#include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
    3737#include "InitTweak/GenInit.h"     // for fixReturnStatements
     38#include "InitTweak/InitTweak.h"   // for isAssignment, isCopyConstructor
    3839#include "SymTab/Mangler.h"        // for Mangler
    3940#include "CompilationState.h"
Note: See TracChangeset for help on using the changeset viewer.