clang  10.0.0svn
Classes | Enumerations | Functions
clang::minimize_source_to_dependency_directives Namespace Reference

Classes

struct  SkippedRange
 Simplified token range to track the range of a potentially skippable PP directive. More...
 
struct  Token
 Represents a simplified token that's lexed as part of the source minimization. More...
 

Enumerations

enum  TokenKind {
  pp_none, pp_include, pp___include_macros, pp_define,
  pp_undef, pp_import, pp_pragma_import, pp_pragma_once,
  pp_include_next, pp_if, pp_ifdef, pp_ifndef,
  pp_elif, pp_else, pp_endif, decl_at_import,
  cxx_export_decl, cxx_module_decl, cxx_import_decl, pp_eof
}
 Represents the kind of preprocessor directive or a module declaration that is tracked by the source minimizer in its token output. More...
 

Functions

bool computeSkippedRanges (ArrayRef< Token > Input, llvm::SmallVectorImpl< SkippedRange > &Range)
 Computes the potential source ranges that can be skipped by the preprocessor when skipping a directive like if, #ifdef or #elsif. More...
 

Enumeration Type Documentation

◆ TokenKind

Represents the kind of preprocessor directive or a module declaration that is tracked by the source minimizer in its token output.

Enumerator
pp_none 
pp_include 
pp___include_macros 
pp_define 
pp_undef 
pp_import 
pp_pragma_import 
pp_pragma_once 
pp_include_next 
pp_if 
pp_ifdef 
pp_ifndef 
pp_elif 
pp_else 
pp_endif 
decl_at_import 
cxx_export_decl 
cxx_module_decl 
cxx_import_decl 
pp_eof 

Definition at line 33 of file DependencyDirectivesSourceMinimizer.h.

Function Documentation

◆ computeSkippedRanges()

bool clang::minimize_source_to_dependency_directives::computeSkippedRanges ( ArrayRef< Token Input,
llvm::SmallVectorImpl< SkippedRange > &  Range 
)

Computes the potential source ranges that can be skipped by the preprocessor when skipping a directive like if, #ifdef or #elsif.

Returns
false on success, true on error.

Definition at line 900 of file DependencyDirectivesSourceMinimizer.cpp.

References clang::minimizeSourceToDependencyDirectives(), Offset, pp_elif, pp_else, pp_endif, pp_if, pp_ifdef, and pp_ifndef.