llvm-project/clang/docs
mydeveloperday b99bf0e08b [clang-format][PR45816] Add AlignConsecutiveBitFields
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
2020-05-20 07:42:58 +01:00
..
CommandGuide Re-add documentation for -flax-vector-conversions= removed in 2020-01-23 12:28:03 -08:00
analyzer Revert "[analyzer] On-demand parsing capability for CTU" 2020-04-27 14:27:04 +02:00
tools [clang-format] ensure dump_format_style.py works with Python3 correctly 2020-05-07 19:52:12 +01:00
AddressSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
AutomaticReferenceCounting.rst Rewrite the non-trivial structs section of the ARC spec. 2020-03-06 02:51:45 -05:00
Block-ABI-Apple.rst fix some typos to cycle bots 2020-02-10 13:51:23 -05:00
Block-ABI-Apple.txt Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
BlockLanguageSpec.rst
CMakeLists.txt fix comment typo to cycle bots 2020-04-06 18:58:27 -04:00
ClangCheck.rst
ClangCommandLineReference.rst [Driver][docs] Document option -mtune as a no-op. 2020-04-22 09:15:48 +01:00
ClangFormat.rst [doc] Fix broken link. NFC. 2020-04-23 22:47:39 +08:00
ClangFormatStyleOptions.rst [clang-format][PR45816] Add AlignConsecutiveBitFields 2020-05-20 07:42:58 +01:00
ClangPlugins.rst Add an attribute plugin example 2020-03-25 14:33:44 +00:00
ClangStaticAnalyzer.rst [analyzer]Add user docs rst 2019-07-10 14:49:53 +00:00
ClangTools.rst Fix some sphinx doc errors. 2019-02-01 17:06:41 +00:00
ConstantInterpreter.rst Fix a few doc typos to cycle bots. 2020-05-16 20:38:28 -04:00
ControlFlowIntegrity.rst cfi-icall: Allow the jump table to be optionally made non-canonical. 2019-08-09 22:31:59 +00:00
ControlFlowIntegrityDesign.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
CrossCompilation.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
DataFlowSanitizer.rst [libcxx][docs][dfsan] Fix rst rendering related typos 2020-04-27 15:07:11 -07:00
DataFlowSanitizerDesign.rst
DiagnosticsReference.rst [WebAssembly] Handle exception specifications 2020-05-19 01:16:09 -07:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst Update hwasan docs to cover outlined checks and globals. 2020-02-06 17:44:43 -08:00
HowToSetupToolingForLLVM.rst Don't call anyone lazy in the documentation. 2020-03-17 16:33:28 -04:00
InternalsManual.rst Add ParsedAttrInfo::handleDeclAttribute 2020-03-23 13:23:11 +00:00
IntroductionToTheClangAST.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
LTOVisibility.rst LTOVisibility.rst: fix up syntax in example 2020-01-08 11:43:11 -08:00
LanguageExtensions.rst Add support for #pragma clang fp reassociate(on|off) 2020-05-06 08:05:44 -07:00
LeakSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
LibASTImporter.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
LibASTMatchers.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibASTMatchersReference.html [ASTMatchers] Added BinaryOperator hasOperands matcher 2020-05-17 19:54:14 +01:00
LibASTMatchersTutorial.rst fix a doc typo to cycle bots 2019-12-20 21:39:01 -05:00
LibFormat.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibTooling.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
MSVCCompatibility.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
Makefile.sphinx
MatrixTypes.rst [Matrix] Add draft specification for matrix support in Clang. 2020-04-27 18:00:23 +01:00
MemorySanitizer.rst [ReleaseNotes] MemorySanitizer support of ASLR on FreeBSD 2019-08-27 10:04:03 +00:00
Modules.rst [Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes search paths and diagnostics. 2019-10-21 22:51:13 +00:00
ObjectiveCLiterals.rst
OpenCLSupport.rst [OpenCL] Add doc to describe OpenCL support 2019-10-17 12:56:02 +00:00
OpenMPSupport.rst [OPENMP][DOCS]Update status of oimplemented constructs, NFC. 2020-04-07 15:45:08 -04:00
PCHInternals.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
PCHLayout.graffle
PCHLayout.png
RAVFrontendAction.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
README.txt
RefactoringEngine.rst
ReleaseNotes.rst [clang-format][PR45816] Add AlignConsecutiveBitFields 2020-05-20 07:42:58 +01:00
SafeStack.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
SanitizerCoverage.rst Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang 2020-04-10 10:44:03 -07:00
SanitizerSpecialCaseList.rst
SanitizerStats.rst [docs] -fsanitize=cfi only allowed with -fvisibility= 2018-06-15 23:11:18 +00:00
ShadowCallStack.rst Delete x86_64 ShadowCallStack support 2019-03-07 18:56:36 +00:00
SourceBasedCodeCoverage.rst fix some typos to cycle bots 2020-02-10 13:51:23 -05:00
ThinLTO.rst ThinLTO: Document the option BOOTSTRAP_LLVM_ENABLE_LTO 2019-09-02 15:34:53 +00:00
ThreadSafetyAnalysis.rst
ThreadSanitizer.rst [docs] Add some architectures into the list of supported ThreadSanitizer platforms 2019-03-05 21:10:42 +00:00
Toolchain.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
Tooling.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
UndefinedBehaviorSanitizer.rst [local-bounds] Ignore volatile operations 2020-05-05 23:08:08 -07:00
UsersManual.rst Uniuqe Names for Internal Linkage Symbols. 2020-05-07 18:18:37 -07:00
conf.py Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] Remove LLVM_ALIGNAS 2019-07-31 03:22:08 +00:00
index.rst [OpenCL] Add doc to describe OpenCL support 2019-10-17 12:56:02 +00:00
make.bat

README.txt

See llvm/docs/README.txt