<div dir="ltr"><div>Hello all,</div><div><br></div><div>I'm trying to get the .cc file's translation unit from the .h file that I've currently matched with a `MatchCallback`, I am doing this by name where I've matched a class declaration `D` defined in D.hh and I need to run a `RecursiveASTVisitor` on D.cc. So far I've figured out how to get a `FileEntry` object and I'm stuck trying to figure out how to get a `TranslationUnitDecl` that I can then run the ASTVisitor on.</div>
<div><br></div><div>This is my code so far inside my `MatchCallback::run` method , any advice on how to parse this .cc file from the .hh file? I would like to avoid building *another* FrontendAction and ASTConsumer, but let me know if this is the only way to accomplish this. Any help would be appreciated.</div>
<div><br></div><div>    ASTContext *context = Result.Context;</div><div>    SourceManager &source_manager = context->getSourceManager();</div><div>    FileManager &file_manager = source_manager->getFileManager();</div>
<div>    const FileEntry *file_entry = file_manager.getFile(class_name + ".cc");</div><div>    // ... Need code here to get a TranslationUnitDecl from file_entry.</div><div>    </div><div><br></div><div><br></div>
</div>