From: Reid Kleckner Date: Wed, 12 Jun 2019 19:50:06 +0000 (+0000) Subject: Add comment to r363191 code as requested in code review X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=727426ea36eadcb12ae93c5a1b20b44a47f56e08;p=clang Add comment to r363191 code as requested in code review git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363195 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index d696d262c7..0657528dc1 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -9804,8 +9804,11 @@ static GVALinkage basicGVALinkageForVariable(const ASTContext &Context, // was marked inline. MSVC 14.21.27702 headers define _Is_integral in a // header this way, and we don't want to emit non-discardable definitions // of these variables in every TU that includes . This - // behavior can be removed if the headers change to explicitly mark such - // variable template specializations inline. + // behavior is non-conforming, since another TU could use an extern + // template declaration for this variable, but for constexpr variables, + // it's unlikely for a user to want to do that. This behavior can be + // removed if the headers change to explicitly mark such variable template + // specializations inline. if (isa(VD) && VD->isConstexpr()) return GVA_DiscardableODR;