[clang] Enable AST mutation in the constant evaluator (PR #115168)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 07:28:22 PST 2024
================
@@ -352,6 +353,16 @@ struct SkipBodyInfo {
NamedDecl *New = nullptr;
};
+/// Implementation of EvalASTMutator interface that enables constant evaluator
+/// to modify AST, e.g. to instantiate templates.
+struct SemaASTMutator : EvalASTMutator {
----------------
erichkeane wrote:
I wonder if `Sema` should just be the implementer here, rather than a separate mutator object? Mark it `final`, and we get free devirtualization in Sema, but that way we can more simply add elements here without the wrapper here.
https://github.com/llvm/llvm-project/pull/115168
More information about the cfe-commits
mailing list