clang 19.0.0git
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"

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 273 of file Tokens.h.

Member Data Documentation

◆ Expanded

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

Definition at line 275 of file Tokens.h.

◆ Spelled

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

Definition at line 274 of file Tokens.h.


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