Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SymTab/Indexer.cc	(revision 307a732f5fa4b97b19f405fc215fcd76f473e3a1)
@@ -652,5 +652,5 @@
 			for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) {
 				// check for C decls with the same name, skipping those with a compatible type (by mangleName)
-				if ( decl->second->get_linkage() == LinkageSpec::C && decl->first != mangleName ) return true;
+				if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first != mangleName ) return true;
 			}
 		}
@@ -669,5 +669,5 @@
 				// check for C decls with the same name, skipping
 				// those with an incompatible type (by mangleName)
-				if ( decl->second->get_linkage() == LinkageSpec::C && decl->first == mangleName ) return true;
+				if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first == mangleName ) return true;
 			}
 		}
@@ -724,5 +724,5 @@
 			// new definition shadows the autogenerated one, even at the same scope
 			return false;
-		} else if ( added->get_linkage() != LinkageSpec::C || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {
+		} else if ( LinkageSpec::isMangled( added->get_linkage() ) || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {
 			// typesCompatible doesn't really do the right thing here. When checking compatibility of function types,
 			// we should ignore outermost pointer qualifiers, except _Atomic?
@@ -765,5 +765,5 @@
 
 		// this ensures that no two declarations with the same unmangled name at the same scope both have C linkage
-		if ( decl->get_linkage() == LinkageSpec::C ) {
+		if ( ! LinkageSpec::isMangled( decl->get_linkage() ) ) {
 			// NOTE this is broken in Richard's original code in such a way that it never triggers (it
 			// doesn't check decls that have the same manglename, and all C-linkage decls are defined to
