[clang] [clang][Sema] support block pointers as non-type template parameters (PR #191694)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 19 11:58:02 PDT 2026


================
@@ -6844,7 +6849,7 @@ void CXXNameMangler::mangleValueInTemplateArg(QualType T, const APValue &V,
           Out << "cv";
           mangleType(T);
         }
-        if (T->isPointerType())
+        if (T->isPointerType() || T->isBlockPointerType())
----------------
mizvekov wrote:

Not opposed. Maybe a `getPointerOrBlockPointerType`.

This requires some inspection of the current users, to see if we can basically treat a BlockPointer as a Pointer in most places.

We have a `getPointerOrReferenceType` here, so otherwise we would also probably need a `getPointerOrBlockPointerOrReferenceType` as well.

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


More information about the cfe-commits mailing list