================
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -emit-llvm -o - 
%s | FileCheck %s
+
+// Regression test for https://github.com/llvm/llvm-project/issues/110041
+// (root cause shared with https://github.com/llvm/llvm-project/issues/175934:
+// `&static_data_member` was value-dependent but not instantiation-dependent, 
so
+// decltype(&b) kept its uninstantiated, dependent-flagged type in a<int>).
+// This used to crash CodeGen in ConstantEmitter::tryEmitPrivate.
+
+template <typename> struct a {
+  static char const b{};
----------------
ChenMiaoi wrote:

``` suggestion
  inline static char const b{};
```

https://github.com/llvm/llvm-project/pull/227288
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to