================
@@ -138,12 +138,12 @@ class TranslationUnitDecl : public Decl,
using redeclarable_base::redecls_begin;
using redeclarable_base::redecls_end;
- ASTContext &getASTContext() const { return Ctx; }
+ ASTContext &getASTContext() const { return const_cast<ASTContext &>(Ctx); }
----------------
AaronBallman wrote:
I would expect this interface to return a `const ASTContext &` because the
member function is const, and we'd have a non-`const` overload which returns
the `ASTContext &`.
https://github.com/llvm/llvm-project/pull/185401
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits