Skip to content

Commit

Permalink
We can't skip function bodies or we miss static assertions in our tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Aug 15, 2023
1 parent 672d7fa commit 7420c22
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions subdoc/lib/visit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,6 @@ std::unique_ptr<clang::FrontendAction> VisitorFactory::create() noexcept {
return std::make_unique<VisitorAction>(cx, docs_db, line_stats);
}

bool VisitorAction::PrepareToExecuteAction(
clang::CompilerInstance& inst) noexcept {
// Speed things up by skipping things we're not looking at.
inst.getFrontendOpts().SkipFunctionBodies = true;
return true;
}

std::unique_ptr<clang::ASTConsumer> VisitorAction::CreateASTConsumer(
clang::CompilerInstance&, llvm::StringRef file) noexcept {
if (cx.options.show_progress) {
Expand Down
2 changes: 0 additions & 2 deletions subdoc/lib/visit.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ struct VisitorAction : public clang::ASTFrontendAction {
explicit VisitorAction(VisitCx& cx, Database& docs_db, LineStats& line_stats)
: cx(cx), docs_db(docs_db), line_stats(line_stats) {}

bool PrepareToExecuteAction(clang::CompilerInstance& inst) noexcept final;

/// Returns a Visitor.
std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
clang::CompilerInstance& compiler, llvm::StringRef file) noexcept final;
Expand Down

0 comments on commit 7420c22

Please sign in to comment.