[modules] Fix false report of an ODR violation when merging frienddeclarations. We can't expect to find them in the canonical definitionof the class, because that's not where they live.This means
[modules] Fix false report of an ODR violation when merging frienddeclarations. We can't expect to find them in the canonical definitionof the class, because that's not where they live.This means we no longer reject real ODR violations with friend declarations,but we weren't consistently doing so anyway.llvm-svn: 216369
show more ...
Basic ODR checking for C++ modules:If we have multiple definitions of the same entity from different modules, wenominate the first definition which we see as being the canonical definition.If we
Basic ODR checking for C++ modules:If we have multiple definitions of the same entity from different modules, wenominate the first definition which we see as being the canonical definition.If we load a declaration from a different definition and we can't find acorresponding declaration in the canonical definition, issue a diagnostic.This is insufficient to prevent things from going horribly wrong in all cases-- we might be in the middle of emitting IR for a function when we trigger somedeserialization and discover that it refers to an incoherent piece of the AST,by which point it's probably too late to bail out -- but we'll at least producea diagnostic.llvm-svn: 192950