diff options
Diffstat (limited to 'include/clang/Sema/SemaInternal.h')
-rw-r--r-- | include/clang/Sema/SemaInternal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Sema/SemaInternal.h b/include/clang/Sema/SemaInternal.h index a01e8d639f60..4dc215ba21cb 100644 --- a/include/clang/Sema/SemaInternal.h +++ b/include/clang/Sema/SemaInternal.h @@ -73,7 +73,8 @@ inline void MarkVarDeclODRUsed(VarDecl *Var, // Keep track of used but undefined variables. // FIXME: We shouldn't suppress this warning for static data members. if (Var->hasDefinition(SemaRef.Context) == VarDecl::DeclarationOnly && - (!Var->isExternallyVisible() || Var->isInline()) && + (!Var->isExternallyVisible() || Var->isInline() || + SemaRef.isExternalWithNoLinkageType(Var)) && !(Var->isStaticDataMember() && Var->hasInit())) { SourceLocation &old = SemaRef.UndefinedButUsed[Var->getCanonicalDecl()]; if (old.isInvalid()) |