[clang] [PATCH 1/6] [clang] Improve nested name specifier AST representation (PR #147835)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 21 20:03:22 PDT 2025
================
@@ -181,14 +181,14 @@ template <bool IsConst> class DynamicRecursiveASTVisitorBase {
///
/// \returns false if the visitation was terminated early, true
/// otherwise (including when the argument is a Null type).
- virtual bool TraverseType(QualType T);
+ virtual bool TraverseType(QualType T, bool TraverseQualifier = true);
----------------
Sirraide wrote:
> Can we add data member/member function `[Dynamic]RecursiveASTVisitor::shouldVisitQualifier` instead of adding function parameter?
I was going to comment that too at first when I looked at this pr, but I don’t think that approach makes as much sense in this particular case because we explictly pass `false`/`true` in a few places for this parameter in the RAV implementation, whereas the `shouldXYZ()` functions are something whose value is usually (or always, I think?) specified by the derived class and not by RAV itself.
So yeah, I agree it makes more sense to keep this as a parameter.
https://github.com/llvm/llvm-project/pull/147835
More information about the cfe-commits
mailing list