mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 00:20:14 +00:00
Fix -Wmissing-variable-declarations regression.
This issue was introduced in r181677. PR17349. llvm-svn: 191339
This commit is contained in:
parent
5d5f60c391
commit
1f5d8882f9
@ -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())) {
|
||||
|
@ -41,3 +41,9 @@ int CGood1::MGood1;
|
||||
namespace {
|
||||
int mgood4;
|
||||
}
|
||||
|
||||
class C {
|
||||
void test() {
|
||||
static int x = 0; // no-warn
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user