[clang] [Clang] [NFC] Refactor more AST visitors (PR #116823)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 10:45:44 PST 2024
================
@@ -266,7 +265,7 @@ class RenameLocFinder : public RecursiveASTVisitor<RenameLocFinder> {
return true;
}
- bool VisitDeclRefExpr(const DeclRefExpr *Expr) {
----------------
Sirraide wrote:
So `RecursiveASTVisitor` passes everything around by non-`const` pointer, and `DynamicRecursiveASTVisitor` does the same. But because this doesn’t matter for CRTP, we have some visitors that take only non-`const` pointers, some that take `const` pointers, and some that mix both seemingly at random. For virtual functions of course, the type has to match exactly, so I had to remove `const` in a bunch of places.
https://github.com/llvm/llvm-project/pull/116823
More information about the cfe-commits
mailing list