================
@@ -266,7 +265,7 @@ class RenameLocFinder : public
RecursiveASTVisitor<RenameLocFinder> {
return true;
}
- bool VisitDeclRefExpr(const DeclRefExpr *Expr) {
----------------
erichkeane wrote:
Urgh, yeah... our const correctness with the recursive AST visitor is... bad.
One thing I think we'd be better off doing if we cared to make this change
(rather than copy/paste) would be to make `RecursiveASTVistior` take a template
parameter that says whether it is const correct-ish and apply it that way. our
parameters would have a lot of `add_const_if<DeclRefExpr, IsConst>` (where
`add_const_if` is a new template we would need to add, and `IsConst` is the
template parameter I referred to).
https://github.com/llvm/llvm-project/pull/116823
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits