r363195 - Add comment to r363191 code as requested in code review
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 12 12:50:07 PDT 2019
Author: rnk
Date: Wed Jun 12 12:50:06 2019
New Revision: 363195
URL: http://llvm.org/viewvc/llvm-project?rev=363195&view=rev
Log:
Add comment to r363191 code as requested in code review
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=363195&r1=363194&r2=363195&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed Jun 12 12:50:06 2019
@@ -9804,8 +9804,11 @@ static GVALinkage basicGVALinkageForVari
// 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 <type_traits>. 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<VarTemplateSpecializationDecl>(VD) && VD->isConstexpr())
return GVA_DiscardableODR;
More information about the cfe-commits
mailing list