Changeset 52e2e3f


Ignore:
Timestamp:
Jun 27, 2016, 4:15:57 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
b9be079b
Parents:
ebf5689 (diff), c1c0928 (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:
4 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rebf5689 r52e2e3f  
    483483
    484484        void ReturnChecker::visit( ReturnStmt * returnStmt ) {
     485                // Previously this also checked for the existence of an expr paired with no return values on
     486                // the  function return type. This is incorrect, since you can have an expression attached to
     487                // a return statement in a void-returning function in C. The expression is treated as if it
     488                // were cast to void.
    485489                if ( returnStmt->get_expr() == NULL && returnVals.size() != 0 ) {
    486490                        throw SemanticError( "Non-void function returns no values: " , returnStmt );
    487                 } else if ( returnStmt->get_expr() != NULL && returnVals.size() == 0 ) {
    488                         throw SemanticError( "void function returns values: " , returnStmt );
    489491                }
    490492        }
  • src/SynTree/Statement.cc

    rebf5689 r52e2e3f  
    399399}
    400400
    401 ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ) : Statement( other ), callStmt( other.callStmt ) {
     401ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ) : Statement( other ), callStmt( maybeClone( other.callStmt ) ) {
    402402}
    403403
    404404ImplicitCtorDtorStmt::~ImplicitCtorDtorStmt() {
     405        delete callStmt;
    405406}
    406407
  • src/tests/Makefile.am

    rebf5689 r52e2e3f  
    2020
    2121.PHONY : list
    22 EXTRA_PROGRAMS = fstream_test vector_test avl_test Constant0-1DP Constant0-1ND Constant0-1NDDP # build but do not install
     22EXTRA_PROGRAMS = fstream_test vector_test avl_test constant0-1DP constant0-1ND constant0-1NDDP # build but do not install
    2323
    2424fstream_test_SOURCES = fstream_test.c
     
    2727
    2828all-local :
    29         python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast
     29        python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast
    3030
    3131all-tests :
     
    3838        python test.py --list
    3939
    40 Constant0-1DP : Constant0-1.c
     40constant0-1DP : constant0-1.c
    4141        ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
    4242
    43 Constant0-1ND : Constant0-1.c
     43constant0-1ND : constant0-1.c
    4444        ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
    4545
    46 Constant0-1NDDP : Constant0-1.c
     46constant0-1NDDP : constant0-1.c
    4747        ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
  • src/tests/Makefile.in

    rebf5689 r52e2e3f  
    3636POST_UNINSTALL = :
    3737EXTRA_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT) \
    38         avl_test$(EXEEXT) Constant0-1DP$(EXEEXT) \
    39         Constant0-1ND$(EXEEXT) Constant0-1NDDP$(EXEEXT)
     38        avl_test$(EXEEXT) constant0-1DP$(EXEEXT) \
     39        constant0-1ND$(EXEEXT) constant0-1NDDP$(EXEEXT)
    4040subdir = src/tests
    4141DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     
    4848CONFIG_CLEAN_FILES =
    4949CONFIG_CLEAN_VPATH_FILES =
    50 Constant0_1DP_SOURCES = Constant0-1DP.c
    51 Constant0_1DP_OBJECTS = Constant0-1DP.$(OBJEXT)
    52 Constant0_1DP_LDADD = $(LDADD)
    53 Constant0_1ND_SOURCES = Constant0-1ND.c
    54 Constant0_1ND_OBJECTS = Constant0-1ND.$(OBJEXT)
    55 Constant0_1ND_LDADD = $(LDADD)
    56 Constant0_1NDDP_SOURCES = Constant0-1NDDP.c
    57 Constant0_1NDDP_OBJECTS = Constant0-1NDDP.$(OBJEXT)
    58 Constant0_1NDDP_LDADD = $(LDADD)
    5950am_avl_test_OBJECTS = avl_test.$(OBJEXT) avl0.$(OBJEXT) avl1.$(OBJEXT) \
    6051        avl2.$(OBJEXT) avl3.$(OBJEXT) avl4.$(OBJEXT) \
     
    6253avl_test_OBJECTS = $(am_avl_test_OBJECTS)
    6354avl_test_LDADD = $(LDADD)
     55constant0_1DP_SOURCES = constant0-1DP.c
     56constant0_1DP_OBJECTS = constant0-1DP.$(OBJEXT)
     57constant0_1DP_LDADD = $(LDADD)
     58constant0_1ND_SOURCES = constant0-1ND.c
     59constant0_1ND_OBJECTS = constant0-1ND.$(OBJEXT)
     60constant0_1ND_LDADD = $(LDADD)
     61constant0_1NDDP_SOURCES = constant0-1NDDP.c
     62constant0_1NDDP_OBJECTS = constant0-1NDDP.$(OBJEXT)
     63constant0_1NDDP_LDADD = $(LDADD)
    6464am_fstream_test_OBJECTS = fstream_test.$(OBJEXT)
    6565fstream_test_OBJECTS = $(am_fstream_test_OBJECTS)
     
    9292am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
    9393am__v_GEN_0 = @echo "  GEN   " $@;
    94 SOURCES = Constant0-1DP.c Constant0-1ND.c Constant0-1NDDP.c \
    95         $(avl_test_SOURCES) $(fstream_test_SOURCES) \
     94SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \
     95        constant0-1NDDP.c $(fstream_test_SOURCES) \
    9696        $(vector_test_SOURCES)
    97 DIST_SOURCES = Constant0-1DP.c Constant0-1ND.c Constant0-1NDDP.c \
    98         $(avl_test_SOURCES) $(fstream_test_SOURCES) \
     97DIST_SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \
     98        constant0-1NDDP.c $(fstream_test_SOURCES) \
    9999        $(vector_test_SOURCES)
    100100ETAGS = etags
     
    261261        -rm -f *.tab.c
    262262
    263 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1DP.Po@am__quote@
    264 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1ND.Po@am__quote@
    265 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1NDDP.Po@am__quote@
    266263@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
    267264@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl-private.Po@am__quote@
     
    272269@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl4.Po@am__quote@
    273270@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_test.Po@am__quote@
     271@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1DP.Po@am__quote@
     272@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1ND.Po@am__quote@
     273@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1NDDP.Po@am__quote@
    274274@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@
    275275@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Po@am__quote@
     
    634634
    635635all-local :
    636         python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast
     636        python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast
    637637
    638638all-tests :
     
    645645        python test.py --list
    646646
    647 Constant0-1DP : Constant0-1.c
     647constant0-1DP : constant0-1.c
    648648        ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
    649649
    650 Constant0-1ND : Constant0-1.c
     650constant0-1ND : constant0-1.c
    651651        ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
    652652
    653 Constant0-1NDDP : Constant0-1.c
     653constant0-1NDDP : constant0-1.c
    654654        ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
    655655
Note: See TracChangeset for help on using the changeset viewer.