Changeset 208e5be for src/SymTab
- Timestamp:
- Jul 5, 2017, 4:59:17 PM (7 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5805d15
- Parents:
- b1e63ac5 (diff), 1ce2189 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
rb1e63ac5 r208e5be 653 653 for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) { 654 654 // check for C decls with the same name, skipping those with a compatible type (by mangleName) 655 if ( decl->second->get_linkage() == LinkageSpec::C&& decl->first != mangleName ) return true;655 if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first != mangleName ) return true; 656 656 } 657 657 } … … 670 670 // check for C decls with the same name, skipping 671 671 // those with an incompatible type (by mangleName) 672 if ( decl->second->get_linkage() == LinkageSpec::C&& decl->first == mangleName ) return true;672 if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first == mangleName ) return true; 673 673 } 674 674 } … … 725 725 // new definition shadows the autogenerated one, even at the same scope 726 726 return false; 727 } else if ( added->get_linkage() != LinkageSpec::C|| ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {727 } else if ( LinkageSpec::isMangled( added->get_linkage() ) || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) { 728 728 // typesCompatible doesn't really do the right thing here. When checking compatibility of function types, 729 729 // we should ignore outermost pointer qualifiers, except _Atomic? … … 766 766 767 767 // this ensures that no two declarations with the same unmangled name at the same scope both have C linkage 768 if ( decl->get_linkage() == LinkageSpec::C) {768 if ( ! LinkageSpec::isMangled( decl->get_linkage() ) ) { 769 769 // NOTE this is broken in Richard's original code in such a way that it never triggers (it 770 770 // doesn't check decls that have the same manglename, and all C-linkage decls are defined to
Note: See TracChangeset
for help on using the changeset viewer.