From: Richard Smith Date: Sat, 2 Dec 2017 00:55:48 +0000 (+0000) Subject: Move comment back to being next to the code it's a comment for. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37dd25ad0cb647450655e87f48fe01f862dc0cdc;p=clang Move comment back to being next to the code it's a comment for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319601 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index a755e61b75..41c4fd0e6c 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1974,6 +1974,9 @@ VarDecl *VarDecl::getCanonicalDecl() { return getFirstDecl(); } VarDecl::DefinitionKind VarDecl::isThisDeclarationADefinition(ASTContext &C) const { + if (isThisDeclarationADemotedDefinition()) + return DeclarationOnly; + // C++ [basic.def]p2: // A declaration is a definition unless [...] it contains the 'extern' // specifier or a linkage-specification and neither an initializer [...], @@ -1987,9 +1990,6 @@ VarDecl::isThisDeclarationADefinition(ASTContext &C) const { // // FIXME: How do you declare (but not define) a partial specialization of // a static data member template outside the containing class? - if (isThisDeclarationADemotedDefinition()) - return DeclarationOnly; - if (isStaticDataMember()) { if (isOutOfLine() && !(getCanonicalDecl()->isInline() &&