[clang] Change `ASTUnit::getASTContext() const` to return a non-const `ASTContext` (PR #130096)
Boaz Brickner via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 6 08:16:12 PST 2025
bricknerb wrote:
Thanks for the feedback!
Is there a way to call `ASTContext::createMangleContext()` when I have a `const ASTUnit`?
I've tried to make `ASTContext::createMangleContext()` const but this failed as it seems to actually call methods that potentially modify the context.
However, when I have a `const Decl`, I can just call `getAstContext().createMangleContext()`.
https://github.com/llvm/llvm-project/pull/130096
More information about the cfe-commits
mailing list