[llvm] [LLVM Demangler] Set `InConstraintExpr` to `true` when demangling a c… (PR #107385)
Ilya Biryukov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 04:53:49 PDT 2024
================
@@ -5737,6 +5737,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseTemplateParamDecl(
}
if (consumeIf("Tk")) {
+ ScopedOverride<bool> SaveInConstraintExpr(InConstraintExpr, true);
----------------
ilya-biryukov wrote:
Could we rename `InConstraintExpr` to something that matches what we're trying to do better?
The main problem seems to be that it is not just `<constraint-expr>` that may have problems resolving the names of template parameters due to lack of mapping, but also the template arguments that preceded it.
```
<template-args> ::= I <template-arg>* [Q <requires-clause expr>] E
```
Something like `HasIncompleteTemplateParameterTracking` would make the code more readable.
https://github.com/llvm/llvm-project/pull/107385
More information about the llvm-commits
mailing list