[clang] [Clang][ItaniumMangle] Mangle an original dependent enable_if expression (PR #234915)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 16:00:10 PST 2026


zwuis wrote:

My bad. I should give an example:

```cpp
template <typename T> struct B {
template <int N> int get(int i)
    __attribute__((enable_if(i == N, ""))) { return 0; }
};
int q1 = B<int>().get<1>(1);
```

Suggested changes for the LLVM demangler (in `ItaniumDemangle.h`, from DeepSeek, and has _not_ being verified by me):

```diff
   if (consumeIf("Ua9enable_ifI")) {
     size_t BeforeArgs = Names.size();
     while (!consumeIf('E')) {
-      Node *Arg = getDerived().parseTemplateArg();
+      Node *Arg = getDerived().parseConstraintExpr();
```

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


More information about the cfe-commits mailing list