Browse Source

Speed up parsing of the AST by skipping function bodies.

pull/1/head
triton 13 years ago
parent
commit
8b2facf759
  1. 4
      src/Parser/Parser.cpp

4
src/Parser/Parser.cpp

@ -1353,7 +1353,9 @@ bool Parser::Parse(const std::string& File)
clang::DiagnosticConsumer* client = C->getDiagnostics().getClient(); clang::DiagnosticConsumer* client = C->getDiagnostics().getClient();
client->BeginSourceFile(C->getLangOpts(), &C->getPreprocessor()); 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(); client->EndSourceFile();
if(client->getNumErrors() != 0) if(client->getNumErrors() != 0)

Loading…
Cancel
Save