forked from OSchip/llvm-project
b99bf0e08b
Summary: The following revision follows D80115 since @MyDeveloperDay and I apparently both had the same idea at the same time, for https://bugs.llvm.org/show_bug.cgi?id=45816 and my efforts on tooling support for AMDVLK, respectively. This option aligns adjacent bitfield separators across lines, in a manner similar to AlignConsecutiveAssignments and friends. Example: ``` struct RawFloat { uint32_t sign : 1; uint32_t exponent : 8; uint32_t mantissa : 23; }; ``` would become ``` struct RawFloat { uint32_t sign : 1; uint32_t exponent : 8; uint32_t mantissa : 23; }; ``` This also handles c++2a style bitfield-initializers with AlignConsecutiveAssignments. ``` struct RawFloat { uint32_t sign : 1 = 0; uint32_t exponent : 8 = 127; uint32_t mantissa : 23 = 0; }; // defaults to 1.0f ``` Things this change does not do: - Align multiple comma-chained bitfield variables. None of the other AlignConsecutive* options seem to implement that either. - Detect bitfields that have a width specified with something other than a numeric literal (ie, `int a : SOME_MACRO;`). That'd be fairly difficult to parse and is rare. Patch By: JakeMerdichAMD Reviewed By: MyDeveloperDay Subscribers: cfe-commits, MyDeveloperDay Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D80176 |
||
---|---|---|
.. | ||
CommandGuide | ||
analyzer | ||
tools | ||
AddressSanitizer.rst | ||
AutomaticReferenceCounting.rst | ||
Block-ABI-Apple.rst | ||
Block-ABI-Apple.txt | ||
BlockLanguageSpec.rst | ||
CMakeLists.txt | ||
ClangCheck.rst | ||
ClangCommandLineReference.rst | ||
ClangFormat.rst | ||
ClangFormatStyleOptions.rst | ||
ClangPlugins.rst | ||
ClangStaticAnalyzer.rst | ||
ClangTools.rst | ||
ConstantInterpreter.rst | ||
ControlFlowIntegrity.rst | ||
ControlFlowIntegrityDesign.rst | ||
CrossCompilation.rst | ||
DataFlowSanitizer.rst | ||
DataFlowSanitizerDesign.rst | ||
DiagnosticsReference.rst | ||
DriverArchitecture.png | ||
DriverInternals.rst | ||
ExternalClangExamples.rst | ||
FAQ.rst | ||
HardwareAssistedAddressSanitizerDesign.rst | ||
HowToSetupToolingForLLVM.rst | ||
InternalsManual.rst | ||
IntroductionToTheClangAST.rst | ||
ItaniumMangleAbiTags.rst | ||
JSONCompilationDatabase.rst | ||
LTOVisibility.rst | ||
LanguageExtensions.rst | ||
LeakSanitizer.rst | ||
LibASTImporter.rst | ||
LibASTMatchers.rst | ||
LibASTMatchersReference.html | ||
LibASTMatchersTutorial.rst | ||
LibFormat.rst | ||
LibTooling.rst | ||
MSVCCompatibility.rst | ||
Makefile.sphinx | ||
MatrixTypes.rst | ||
MemorySanitizer.rst | ||
Modules.rst | ||
ObjectiveCLiterals.rst | ||
OpenCLSupport.rst | ||
OpenMPSupport.rst | ||
PCHInternals.rst | ||
PCHLayout.graffle | ||
PCHLayout.png | ||
RAVFrontendAction.rst | ||
README.txt | ||
RefactoringEngine.rst | ||
ReleaseNotes.rst | ||
SafeStack.rst | ||
SanitizerCoverage.rst | ||
SanitizerSpecialCaseList.rst | ||
SanitizerStats.rst | ||
ShadowCallStack.rst | ||
SourceBasedCodeCoverage.rst | ||
ThinLTO.rst | ||
ThreadSafetyAnalysis.rst | ||
ThreadSanitizer.rst | ||
Toolchain.rst | ||
Tooling.rst | ||
UndefinedBehaviorSanitizer.rst | ||
UsersManual.rst | ||
conf.py | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in | ||
index.rst | ||
make.bat |
README.txt
See llvm/docs/README.txt