[modules] If we reach a definition of a class for which we already have a
non-visible definition, skip the new definition and make the old one visible instead of trying to parse it again and failing horribly. C++'s ODR allows us to assume that the two definitions are identical. llvm-svn: 233250
This commit is contained in:
@@ -218,6 +218,7 @@ bool Sema::RequireCompleteDeclContext(CXXScopeSpec &SS,
|
||||
// Fixed enum types are complete, but they aren't valid as scopes
|
||||
// until we see a definition, so awkwardly pull out this special
|
||||
// case.
|
||||
// FIXME: The definition might not be visible; complain if it is not.
|
||||
const EnumType *enumType = dyn_cast_or_null<EnumType>(tagType);
|
||||
if (!enumType || enumType->getDecl()->isCompleteDefinition())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user