[clang] [Clang] [Sema] Fix crash instantiating a member variable template partial specialization when the enclosing class template is deserialized (PR #202958)

Shengxin Pei via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 02:43:25 PDT 2026


================
@@ -0,0 +1,19 @@
+// Build a PCH that contains compiler errors (an unresolved #include), then use
+// it and force instantiation of a class template that was deserialized from it.
+// The class has a member variable template with a partial specialization; when
+// the enclosing class template comes from the deserialized PCH, the primary
+// member variable template has not been instantiated into the current
+// instantiation yet, so the lookup for it used to come back empty and crash
+// (assertion "Instantiation found nothing?" in +Asserts builds, null
+// dereference otherwise). See GH202956.
----------------
TPPPP72 wrote:

We don't need these comments.

https://github.com/llvm/llvm-project/pull/202958


More information about the cfe-commits mailing list