Changeset 307a732 for src/SymTab/Indexer.cc
- Timestamp:
- Jul 4, 2017, 11:52:33 AM (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:
- 44f44617, 67fa9f9, ad0be81
- Parents:
- 86f384b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
r86f384b r307a732 652 652 for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) { 653 653 // check for C decls with the same name, skipping those with a compatible type (by mangleName) 654 if ( decl->second->get_linkage() == LinkageSpec::C&& decl->first != mangleName ) return true;654 if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first != mangleName ) return true; 655 655 } 656 656 } … … 669 669 // check for C decls with the same name, skipping 670 670 // those with an incompatible type (by mangleName) 671 if ( decl->second->get_linkage() == LinkageSpec::C&& decl->first == mangleName ) return true;671 if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first == mangleName ) return true; 672 672 } 673 673 } … … 724 724 // new definition shadows the autogenerated one, even at the same scope 725 725 return false; 726 } else if ( added->get_linkage() != LinkageSpec::C|| ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {726 } else if ( LinkageSpec::isMangled( added->get_linkage() ) || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) { 727 727 // typesCompatible doesn't really do the right thing here. When checking compatibility of function types, 728 728 // we should ignore outermost pointer qualifiers, except _Atomic? … … 765 765 766 766 // this ensures that no two declarations with the same unmangled name at the same scope both have C linkage 767 if ( decl->get_linkage() == LinkageSpec::C) {767 if ( ! LinkageSpec::isMangled( decl->get_linkage() ) ) { 768 768 // NOTE this is broken in Richard's original code in such a way that it never triggers (it 769 769 // 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.