If the preamble had diagnostic state this would leave behind invalid
state in the DiagnosticsEngine and crash later. The test case runs into
an assertion in DiagnosticsEngine::setSourceManager.
llvm-svn: 294963
declaration context, check whether the primary context---not the
current context---has any external visible declarations. Fixes
PR13616.
llvm-svn: 162083