llvm-project/clang/lib/Format
Sam McCall 04ee232ff2 clang-format: Add new style option AlignConsecutiveMacros
This option behaves similarly to AlignConsecutiveDeclarations and
AlignConsecutiveAssignments, aligning the assignment of C/C++
preprocessor macros on consecutive lines.

I've worked in many projects (embedded, mostly) where header files full
of large, well-aligned "#define" blocks are a common pattern. We
normally avoid using clang-format on these files, since it ruins any
existing alignment in said blocks. This style option will align "simple"
PP macros (no parameters) and PP macros with parameter lists on
consecutive lines.

Related Bugzilla entry (thanks mcuddie):
https://llvm.org/bugs/show_bug.cgi?id=20637

Patch by Nick Renieris (VelocityRa)!

Differential Revision: https://reviews.llvm.org/D28462

llvm-svn: 364938
2019-07-02 15:53:14 +00: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] Fix bug in block comment reflow that joins * and / 2019-05-03 23:15:40 +00:00
BreakableToken.h [clang-format] Fix bug in block comment reflow that joins * and / 2019-05-03 23:15:40 +00:00
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
ContinuationIndenter.cpp [clang-format] Fix bug in reflow of block comments containing CR/LF 2019-04-23 20:29:46 +00:00
ContinuationIndenter.h [clang-format] Fix indent of trailing raw string param after newline 2019-04-18 17:14:05 +00:00
Encoding.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format.cpp clang-format: Add new style option AlignConsecutiveMacros 2019-07-02 15:53:14 +00: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 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.h clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
FormatTokenLexer.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
FormatTokenLexer.h [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
NamespaceEndCommentsFixer.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00: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 Use llvm::stable_sort 2019-04-24 14:43:05 +00: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 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.h [clang-format] Remove unused Environment constructor. 2019-04-18 00:36:51 +00:00
TokenAnnotator.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
TokenAnnotator.h clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineFormatter.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineFormatter.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UnwrappedLineParser.cpp clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
UnwrappedLineParser.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00: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: Add new style option AlignConsecutiveMacros 2019-07-02 15:53:14 +00:00
WhitespaceManager.h clang-format: Add new style option AlignConsecutiveMacros 2019-07-02 15:53:14 +00:00