clang  6.0.0svn
ParseAST.h
Go to the documentation of this file.
1 //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the clang::ParseAST method.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_PARSE_PARSEAST_H
15 #define LLVM_CLANG_PARSE_PARSEAST_H
16 
18 
19 namespace clang {
20  class Preprocessor;
21  class ASTConsumer;
22  class ASTContext;
23  class CodeCompleteConsumer;
24  class Sema;
25 
26  /// \brief Parse the entire file specified, notifying the ASTConsumer as
27  /// the file is parsed.
28  ///
29  /// This operation inserts the parsed decls into the translation
30  /// unit held by Ctx.
31  ///
32  /// \param PrintStats Whether to print LLVM statistics related to parsing.
33  /// \param TUKind The kind of translation unit being parsed.
34  /// \param CompletionConsumer If given, an object to consume code completion
35  /// results.
36  /// \param SkipFunctionBodies Whether to skip parsing of function bodies.
37  /// This option can be used, for example, to speed up searches for
38  /// declarations/definitions when indexing.
39  void ParseAST(Preprocessor &pp, ASTConsumer *C,
40  ASTContext &Ctx, bool PrintStats = false,
42  CodeCompleteConsumer *CompletionConsumer = nullptr,
43  bool SkipFunctionBodies = false);
44 
45  /// \brief Parse the main file known to the preprocessor, producing an
46  /// abstract syntax tree.
47  void ParseAST(Sema &S, bool PrintStats = false,
48  bool SkipFunctionBodies = false);
49 
50 } // end namespace clang
51 
52 #endif
Defines the clang::LangOptions interface.
void ParseAST(Preprocessor &pp, ASTConsumer *C, ASTContext &Ctx, bool PrintStats=false, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr, bool SkipFunctionBodies=false)
Parse the entire file specified, notifying the ASTConsumer as the file is parsed. ...
Definition: ParseAST.cpp:98
Dataflow Directional Tag Classes.
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:242
The translation unit is a complete translation unit.
Definition: LangOptions.h:244