refactor: diagnostic handling (#337)

This commit is contained in:
ykiko
2026-01-03 16:23:06 +08:00
committed by GitHub
parent dee5e136b7
commit dd8f0dd90d
62 changed files with 948 additions and 914 deletions

View File

@@ -8,13 +8,13 @@ namespace clice::testing {
namespace {
struct InputFinder : clang::RecursiveASTVisitor<InputFinder> {
CompilationUnit& unit;
CompilationUnitRef unit;
clang::QualType input;
clang::QualType expect;
using Base = clang::RecursiveASTVisitor<InputFinder>;
InputFinder(CompilationUnit& unit) : unit(unit) {}
InputFinder(CompilationUnitRef unit) : unit(unit) {}
bool TraverseDecl(clang::Decl* decl) {
if(decl && (llvm::isa<clang::TranslationUnitDecl>(decl) ||