- Timestamp:
- Jul 13, 2018, 6:36:34 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 6da49249
- Parents:
- 6b8b767 (diff), ae144af (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. - Location:
- src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
r6b8b767 r0a73148 56 56 {"reference-conversion" , "rvalue to reference conversion of rvalue: %s" , Severity::Warn}, 57 57 {"qualifiers-zero_t-one_t", "questionable use of type qualifier %s with %s", Severity::Warn}, 58 {"aggregate-forward-decl" , "forward declaration of nested aggregate: %s" , Severity::Warn}, 58 59 }; 59 60 … … 62 63 RvalueToReferenceConversion, 63 64 BadQualifiersZeroOne, 65 AggrForwardDecl, 64 66 NUMBER_OF_WARNINGS, //This MUST be the last warning 65 67 }; -
src/Parser/DeclarationNode.cc
r6b8b767 r0a73148 1003 1003 // }; 1004 1004 if ( ! (extracted && decl->name == "" && ! anon) ) { 1005 if (decl->name == "") { 1006 if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>( decl ) ) { 1007 if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) { 1008 if ( aggr->name.find("anonymous") == std::string::npos ) { 1009 bool isInline = false; 1010 if (cur->type->kind == TypeData::Aggregate || cur->type->kind == TypeData::AggregateInst) { 1011 if (cur->type->kind == TypeData::Aggregate) { 1012 isInline = cur->type->aggregate.inLine; 1013 } else { 1014 isInline = cur->type->aggInst.inLine; 1015 if ( TypeData * aggr = cur->type->aggInst.aggregate ) { 1016 if ( aggr->kind == TypeData::Aggregate ) { 1017 isInline = isInline || aggr->aggregate.inLine; 1018 } 1019 } 1020 } 1021 } 1022 if (! isInline) { 1023 // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type 1024 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() ); 1025 } 1026 } 1027 } 1028 } 1029 } 1005 1030 decl->location = cur->location; 1006 1031 * out++ = decl; -
src/Parser/TypedefTable.cc
r6b8b767 r0a73148 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypedefTable.cc -- 7 // TypedefTable.cc -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat May 16 15:20:13 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 12 16:16:24 201813 // Update Count : 25 612 // Last Modified On : Fri Jul 13 18:35:54 2018 13 // Update Count : 257 14 14 // 15 15 -
src/Parser/parser.yy
r6b8b767 r0a73148 2307 2307 { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); } 2308 2308 | assignment_expression 2309 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; } 2309 2310 | type_list ',' type 2310 2311 { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) ) ); } 2311 2312 | type_list ',' assignment_expression 2312 { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2313 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; } 2314 // { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2313 2315 ; 2314 2316 -
src/ResolvExpr/AlternativeFinder.cc
r6b8b767 r0a73148 482 482 template< typename ForwardIterator, typename OutputIterator > 483 483 void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) { 484 if ( newAlt.cost == Cost::infinity ) return; // don't proceed down this dead end 484 485 if ( begin == end ) { 485 486 if ( newNeed.empty() ) { … … 1185 1186 std::cerr << "bindings are:" << std::endl; 1186 1187 withFunc.env.print( std::cerr, 8 ); 1188 std::cerr << "cost is: " << withFunc.cost << std::endl; 1187 1189 std::cerr << "cost of conversion is:" << cvtCost << std::endl; 1188 1190 ) -
src/ResolvExpr/CommonType.cc
r6b8b767 r0a73148 267 267 result = otherPointer->clone(); 268 268 } // if 269 result->get_qualifiers() = tq1 | tq2;269 strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2; 270 270 } else { 271 271 /// std::cerr << "place for ptr-to-type" << std::endl; … … 304 304 result = otherRef->clone(); 305 305 } // if 306 result->get_qualifiers() = tq1 | tq2;306 strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2; 307 307 } else { 308 308 /// std::cerr << "place for ptr-to-type" << std::endl; -
src/SymTab/FixFunction.cc
r6b8b767 r0a73148 30 30 // can't delete function type because it may contain assertions, so transfer ownership to new object 31 31 ObjectDecl *pointer = new ObjectDecl( functionDecl->name, functionDecl->get_storageClasses(), functionDecl->linkage, nullptr, new PointerType( Type::Qualifiers(), functionDecl->type ), nullptr, functionDecl->attributes ); 32 pointer->location = functionDecl->location; 32 33 functionDecl->attributes.clear(); 33 34 functionDecl->type = nullptr; … … 43 44 // need to recursively mutate the base type in order for multi-dimensional arrays to work. 44 45 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic ); 46 pointerType->location = arrayType->location; 45 47 arrayType->base = nullptr; 46 48 arrayType->dimension = nullptr; -
src/libcfa/bits/defs.h
r6b8b767 r0a73148 28 28 29 29 #ifdef __cforall 30 #define __cfa_anonymous_object 30 #define __cfa_anonymous_object(x) inline struct x 31 31 #else 32 #define __cfa_anonymous_object __cfa_anonymous_object32 #define __cfa_anonymous_object(x) x __cfa_anonymous_object 33 33 #endif 34 34 -
src/libcfa/concurrency/invoke.h
r6b8b767 r0a73148 93 93 94 94 // list of acceptable functions, null if any 95 __ small_array_t(struct __acceptable_t) __cfa_anonymous_object;95 __cfa_anonymous_object( __small_array_t(struct __acceptable_t) ); 96 96 }; 97 97 … … 121 121 struct __monitor_group_t { 122 122 // currently held monitors 123 __ small_array_t(monitor_desc*) __cfa_anonymous_object;123 __cfa_anonymous_object( __small_array_t(monitor_desc*) ); 124 124 125 125 // last function that acquired monitors -
src/libcfa/concurrency/monitor
r6b8b767 r0a73148 138 138 139 139 struct __acceptable_t { 140 __monitor_group_t;140 inline struct __monitor_group_t; 141 141 bool is_dtor; 142 142 }; -
src/libcfa/containers/result
r6b8b767 r0a73148 28 28 struct result { 29 29 bool has_value; 30 in ner_result(T, E);30 inline union inner_result(T, E); 31 31 }; 32 32 -
src/libcfa/interpose.c
r6b8b767 r0a73148 33 33 // Interposing helpers 34 34 //============================================================================================= 35 36 void preload_libgcc(void) { 37 dlopen( "libgcc_s.so.1", RTLD_NOW ); 38 if ( const char * error = dlerror() ) abort( "interpose_symbol : internal error pre-loading libgcc, %s\n", error ); 39 } 35 40 36 41 typedef void (* generic_fptr_t)(void); … … 92 97 const char *version = NULL; 93 98 99 preload_libgcc(); 100 94 101 #pragma GCC diagnostic push 95 102 #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
Note: See TracChangeset
for help on using the changeset viewer.