From: Benjamin Kramer Date: Sat, 6 Feb 2010 09:59:24 +0000 (+0000) Subject: Silence GCC warning and stay in 80 cols. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b372f51166bdf7e2951ef4820941ec3523086865;p=clang Silence GCC warning and stay in 80 cols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95494 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 659969334e..521b420e56 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -5006,10 +5006,11 @@ RecordDynamicClassesWithNoKeyFunction(Sema &S, CXXRecordDecl *Record, const CXXMethodDecl *KeyFunction = S.Context.getKeyFunction(Record); if (!KeyFunction) - S.ClassesWithUnmarkedVirtualMembers.push_back(std::make_pair(Record, Loc)); - - if ((!KeyFunction || KeyFunction->getBody() && KeyFunction->isInlined()) && - Record->getLinkage() == ExternalLinkage) + S.ClassesWithUnmarkedVirtualMembers.push_back(std::make_pair(Record, + Loc)); + + if ((!KeyFunction || (KeyFunction->getBody() && KeyFunction->isInlined())) + && Record->getLinkage() == ExternalLinkage) S.Diag(Record->getLocation(), diag::warn_weak_vtable) << Record; } for (DeclContext::decl_iterator D = Record->decls_begin(),