Skip to content

Commit c50f8d1

Browse files
committed
Revert MarkReferencedDecls visitor to use CRTP
1 parent 979eba0 commit c50f8d1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang/lib/Sema/SemaExpr.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "clang/AST/ExprOpenMP.h"
2929
#include "clang/AST/OperationKinds.h"
3030
#include "clang/AST/ParentMapContext.h"
31+
#include "clang/AST/RecursiveASTVisitor.h"
3132
#include "clang/AST/Type.h"
3233
#include "clang/AST/TypeLoc.h"
3334
#include "clang/Basic/Builtins.h"
@@ -19826,14 +19827,15 @@ namespace {
1982619827
// TreeTransforms rebuilding the type in a new context. Rather than
1982719828
// duplicating the TreeTransform logic, we should consider reusing it here.
1982819829
// Currently that causes problems when rebuilding LambdaExprs.
19829-
class MarkReferencedDecls final : public DynamicRecursiveASTVisitor {
19830+
class MarkReferencedDecls final
19831+
: public RecursiveASTVisitor<MarkReferencedDecls> {
1983019832
Sema &S;
1983119833
SourceLocation Loc;
1983219834

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

19836-
bool TraverseTemplateArgument(const TemplateArgument &Arg) override;
19838+
bool TraverseTemplateArgument(const TemplateArgument &Arg);
1983719839
};
1983819840
}
1983919841

@@ -19851,7 +19853,7 @@ bool MarkReferencedDecls::TraverseTemplateArgument(
1985119853
}
1985219854
}
1985319855

19854-
return DynamicRecursiveASTVisitor::TraverseTemplateArgument(Arg);
19856+
return RecursiveASTVisitor::TraverseTemplateArgument(Arg);
1985519857
}
1985619858

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

0 commit comments

Comments
 (0)