[PATCH] D63175: [MS] Pretend constexpr variable template specializations are inline

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 12:48:10 PDT 2019


rnk marked an inline comment as done.
rnk added inline comments.


================
Comment at: clang/lib/AST/ASTContext.cpp:9809
+      // variable template specializations inline.
+      if (isa<VarTemplateSpecializationDecl>(VD) && VD->isConstexpr())
+        return GVA_DiscardableODR;
----------------
rsmith wrote:
> It'd be nice to include a note here that this is strictly non-conforming (since another TU could be relying on this TU to provide the definition), but that we don't expect that to happen in practice for variable template specializations declared `constexpr`.
I forgot to add the comment before pushing, so I added it in rC363195.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63175/new/

https://reviews.llvm.org/D63175





More information about the llvm-commits mailing list