[modules] Teach clang how to merge typedef over anonymous structs in C mode.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Sat, 1 Jul 2017 20:44:49 +0000 (20:44 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Sat, 1 Jul 2017 20:44:49 +0000 (20:44 +0000)
commitb00ea08fda0842452c166538d057cd194ff3b0f6
tree25555d303113ddd7f1b1a23a1f404bc01d444f86
parent94fce50950533255147278dc151bf1720ae07c29
[modules] Teach clang how to merge typedef over anonymous structs in C mode.

In C mode clang fails to merge the textually included definition with the one imported from a module. The C lookup rules fail to find the imported definition because its linkage is internal in non C++ mode.

This patch reinstates some of the ODR merging rules for typedefs of anonymous tags for languages other than C++.

Patch by Raphael Isemann and me (D34510).

llvm-svn: 306964
clang/lib/AST/Decl.cpp
clang/lib/Sema/SemaDecl.cpp
clang/test/Index/usrs.m