Skip to content

Commit

Permalink
Revert MarkReferencedDecls visitor to use CRTP
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirraide committed Aug 19, 2024
1 parent 979eba0 commit c50f8d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions clang/lib/Sema/SemaExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "clang/AST/ExprOpenMP.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Builtins.h"
Expand Down Expand Up @@ -19826,14 +19827,15 @@ namespace {
// TreeTransforms rebuilding the type in a new context. Rather than
// duplicating the TreeTransform logic, we should consider reusing it here.
// Currently that causes problems when rebuilding LambdaExprs.
class MarkReferencedDecls final : public DynamicRecursiveASTVisitor {
class MarkReferencedDecls final
: public RecursiveASTVisitor<MarkReferencedDecls> {
Sema &S;
SourceLocation Loc;

public:
MarkReferencedDecls(Sema &S, SourceLocation Loc) : S(S), Loc(Loc) {}

bool TraverseTemplateArgument(const TemplateArgument &Arg) override;
bool TraverseTemplateArgument(const TemplateArgument &Arg);
};
}

Expand All @@ -19851,7 +19853,7 @@ bool MarkReferencedDecls::TraverseTemplateArgument(
}
}

return DynamicRecursiveASTVisitor::TraverseTemplateArgument(Arg);
return RecursiveASTVisitor::TraverseTemplateArgument(Arg);
}

void Sema::MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T) {
Expand Down

0 comments on commit c50f8d1

Please sign in to comment.