clang  10.0.0svn
Public Attributes | List of all members
clang::syntax::TokenBuffer::Expansion Struct Reference

An expansion produced by the preprocessor, includes macro expansions and preprocessor directives. More...

#include "clang/Tooling/Syntax/Tokens.h"

Collaboration diagram for clang::syntax::TokenBuffer::Expansion:
Collaboration graph
[legend]

Public Attributes

llvm::ArrayRef< syntax::TokenSpelled
 
llvm::ArrayRef< syntax::TokenExpanded
 

Detailed Description

An expansion produced by the preprocessor, includes macro expansions and preprocessor directives.

Preprocessor always maps a non-empty range of spelled tokens to a (possibly empty) range of expanded tokens. Here is a few examples of expansions: #pragma once // Expands to an empty range. #define FOO 1 2 3 // Expands an empty range. FOO // Expands to "1 2 3". FIXME(ibiryukov): implement this, currently #include expansions are empty. #include <vector> // Expands to tokens produced by the include.

Definition at line 221 of file Tokens.h.

Member Data Documentation

◆ Expanded

llvm::ArrayRef<syntax::Token> clang::syntax::TokenBuffer::Expansion::Expanded

Definition at line 223 of file Tokens.h.

Referenced by clang::syntax::TokenBuffer::expansionStartingAt().

◆ Spelled

llvm::ArrayRef<syntax::Token> clang::syntax::TokenBuffer::Expansion::Spelled

Definition at line 222 of file Tokens.h.

Referenced by clang::syntax::TokenBuffer::expansionStartingAt().


The documentation for this struct was generated from the following file: