clang  19.0.0git
ParseAST.h
Go to the documentation of this file.
1 //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the clang::ParseAST method.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_PARSE_PARSEAST_H
14 #define LLVM_CLANG_PARSE_PARSEAST_H
15 
17 
18 namespace clang {
19  class Preprocessor;
20  class ASTConsumer;
21  class ASTContext;
22  class CodeCompleteConsumer;
23  class Sema;
24 
25  /// Parse the entire file specified, notifying the ASTConsumer as
26  /// the file is parsed.
27  ///
28  /// This operation inserts the parsed decls into the translation
29  /// unit held by Ctx.
30  ///
31  /// \param PrintStats Whether to print LLVM statistics related to parsing.
32  /// \param TUKind The kind of translation unit being parsed.
33  /// \param CompletionConsumer If given, an object to consume code completion
34  /// results.
35  /// \param SkipFunctionBodies Whether to skip parsing of function bodies.
36  /// This option can be used, for example, to speed up searches for
37  /// declarations/definitions when indexing.
38  void ParseAST(Preprocessor &pp, ASTConsumer *C,
39  ASTContext &Ctx, bool PrintStats = false,
41  CodeCompleteConsumer *CompletionConsumer = nullptr,
42  bool SkipFunctionBodies = false);
43 
44  /// Parse the main file known to the preprocessor, producing an
45  /// abstract syntax tree.
46  void ParseAST(Sema &S, bool PrintStats = false,
47  bool SkipFunctionBodies = false);
48 
49 } // end namespace clang
50 
51 #endif
Defines the clang::LangOptions interface.
The JSON file list parser is used to communicate input to InstallAPI.
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:101
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:1074
@ TU_Complete
The translation unit is a complete translation unit.
Definition: LangOptions.h:1076