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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 16:51:13 PDT 2019


rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/AST/ASTContext.cpp:9809
+      // variable template specializations inline.
+      if (isa<VarTemplateSpecializationDecl>(VD) && VD->isConstexpr())
+        return GVA_DiscardableODR;
----------------
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`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63175





More information about the cfe-commits mailing list