From 8b2facf759d88039f6af67d58b86bfc5acce8848 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 20 Jan 2013 17:55:31 +0000 Subject: [PATCH] Speed up parsing of the AST by skipping function bodies. --- src/Parser/Parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 0807d24e..87a73e77 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -1353,7 +1353,9 @@ bool Parser::Parse(const std::string& File) clang::DiagnosticConsumer* client = C->getDiagnostics().getClient(); client->BeginSourceFile(C->getLangOpts(), &C->getPreprocessor()); - ParseAST(C->getPreprocessor(), &C->getASTConsumer(), C->getASTContext()); + ParseAST(C->getPreprocessor(), &C->getASTConsumer(), C->getASTContext(), + /*PrintStats=*/false, clang::TU_Complete, 0, + /*SkipFunctionBodies=*/true); client->EndSourceFile(); if(client->getNumErrors() != 0)