clang-tools 20.0.0git
|
A preprocessor conditional section. More...
#include <DirectiveTree.h>
Public Attributes | |
std::vector< std::pair< Directive, DirectiveTree > > | Branches |
The sequence of directives that introduce top-level alternative parses. | |
Directive | End |
The directive terminating the conditional, should be #endif. | |
std::optional< unsigned > | Taken |
The index of the conditional branch we chose as active. | |
A preprocessor conditional section.
This starts with an #if, #ifdef, #ifndef etc directive. It covers all #else branches, and spans until the matching #endif.
Definition at line 74 of file DirectiveTree.h.
std::vector<std::pair<Directive, DirectiveTree> > clang::clangd::DirectiveTree::Conditional::Branches |
The sequence of directives that introduce top-level alternative parses.
The first branch will have an #if type directive. Subsequent branches will have #else type directives.
Definition at line 79 of file DirectiveTree.h.
Directive clang::clangd::DirectiveTree::Conditional::End |
The directive terminating the conditional, should be #endif.
Definition at line 81 of file DirectiveTree.h.
std::optional<unsigned> clang::clangd::DirectiveTree::Conditional::Taken |
The index of the conditional branch we chose as active.
std::nullopt indicates no branch was taken (e.g. #if 0 ... #endif). The initial tree from parse()
has no branches marked as taken. See chooseConditionalBranches()
.
Definition at line 86 of file DirectiveTree.h.