Fix -Wmissing-variable-declarations regression.

This issue was introduced in r181677.

PR17349.

llvm-svn: 191339
This commit is contained in:
Eli Friedman 2013-09-24 23:10:08 +00:00
parent 5d5f60c391
commit 1f5d8882f9
2 changed files with 7 additions and 1 deletions

View File

@ -8683,7 +8683,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {
}
if (var->isThisDeclarationADefinition() &&
var->isExternallyVisible() &&
var->isExternallyVisible() && var->hasLinkage() &&
getDiagnostics().getDiagnosticLevel(
diag::warn_missing_variable_declarations,
var->getLocation())) {

View File

@ -41,3 +41,9 @@ int CGood1::MGood1;
namespace {
int mgood4;
}
class C {
void test() {
static int x = 0; // no-warn
}
};