Revert r280035 (and followups r280057, r280085), it caused PR30195
llvm-svn: 280091
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 0bc4680..e58e3f7 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -546,13 +546,7 @@
return false;
} else if (getLangOpts().getCompilingModule() ==
LangOptions::CMK_ModuleInterface) {
- // FIXME: We avoid providing this diagnostic when generating an object file
- // from an existing PCM file. This is not a good way to detect this
- // condition; we should provide a mechanism to indicate whether we've
- // already parsed a declaration in this translation unit and avoid calling
- // ParseFirstTopLevelDecl in that case.
- if (Actions.TUKind == TU_Module)
- Diag(Tok, diag::err_expected_module_interface_decl);
+ Diag(Tok, diag::err_expected_module_interface_decl);
}
// C11 6.9p1 says translation units must have at least one top-level