erik.pilkington added a comment. Hmm, looks like this patch fails to fix the case where we're referencing the variable in an non-odr use context, since we don't even bother to instantiate the initializer here:
template <class T> struct S { template <class T2> static constexpr auto x = 43; }; int main() { sizeof(S<int>::x<char>); } I think we should instantiate the initializer before forming a referencing expression and marking it used. @rsmith: do you mind if I just land https://reviews.llvm.org/D65022?id=210905 and file a bug to fix the regression we're seeing here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65022/new/ https://reviews.llvm.org/D65022 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits