llvm-project/clang/lib/Format
Manuel Klimek e336b74c99 [clang-format] Add a MacroExpander.
Summary:
The MacroExpander allows to expand simple (non-resursive) macro
definitions from a macro identifier token and macro arguments. It
annotates the tokens with a newly introduced MacroContext that keeps
track of the role a token played in expanding the macro in order to
be able to reconstruct the macro expansion from an expanded (formatted)
token stream.

Made Token explicitly copy-able to enable copying tokens from the parsed
macro definition.

Reviewers: sammccall

Subscribers: mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83296
2020-09-25 14:08:13 +02:00
..
AffectedRangeManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AffectedRangeManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakableToken.cpp [clang-format] use spaces for alignment with UT_ForContinuationAndIndentation 2020-04-13 15:14:26 +01:00
BreakableToken.h [clang][NFC] Make various uses of Regex const 2019-11-19 16:15:21 +00:00
CMakeLists.txt [clang-format] Add a MacroExpander. 2020-09-25 14:08:13 +02:00
ContinuationIndenter.cpp [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces 2020-08-11 14:56:26 +02:00
ContinuationIndenter.h [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set 2020-05-15 16:40:31 +02:00
Encoding.h [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab 2019-09-18 18:57:09 +00:00
Format.cpp Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
FormatInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.cpp [clang-format] Fix formatting of _Atomic() qualifier 2020-09-07 10:09:18 +01:00
FormatToken.h [clang-format] Add a MacroExpander. 2020-09-25 14:08:13 +02:00
FormatTokenLexer.cpp [clang-format][regression][PR47461] ifdef causes catch to be seen as a function 2020-09-17 13:23:06 +01:00
FormatTokenLexer.h Hand Allocator and IdentifierTable into FormatTokenLexer. 2020-07-07 11:56:34 +02:00
MacroExpander.cpp [clang-format] Add a MacroExpander. 2020-09-25 14:08:13 +02:00
Macros.h [clang-format] Add a MacroExpander. 2020-09-25 14:08:13 +02:00
NamespaceEndCommentsFixer.cpp [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace 2020-05-30 13:15:27 +01:00
NamespaceEndCommentsFixer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.cpp [ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers. 2020-04-14 14:11:02 +03:00
SortJavaScriptImports.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.cpp Hand Allocator and IdentifierTable into FormatTokenLexer. 2020-07-07 11:56:34 +02:00
TokenAnalyzer.h [clang-format] Remove unused Environment constructor. 2019-04-18 00:36:51 +00:00
TokenAnnotator.cpp TokenAnnotator.cpp - remove useless pointer null test. NFCI. 2020-09-16 12:30:24 +01:00
TokenAnnotator.h clang-format clang/lib/Format 2019-07-29 13:26:48 +00:00
UnwrappedLineFormatter.cpp [clang-format] fix BreakBeforeBraces.MultiLine with for each macros 2020-08-05 14:31:42 -04:00
UnwrappedLineFormatter.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UnwrappedLineParser.cpp [clang-format][NFC] Be more careful about the layout of FormatToken. 2020-07-28 10:30:28 +01:00
UnwrappedLineParser.h [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses 2020-05-26 18:48:49 +01:00
UsingDeclarationsSorter.cpp Use llvm::stable_sort 2019-04-24 14:43:05 +00:00
UsingDeclarationsSorter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WhitespaceManager.cpp [clang-format][NFC] Be more careful about the layout of FormatToken. 2020-07-28 10:30:28 +01:00
WhitespaceManager.h [clang-format][PR45816] Add AlignConsecutiveBitFields 2020-05-20 07:42:58 +01:00