[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 24 00:28:18 PDT 2024


================
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch.
 
 .. _optin-performance-Padding:
 
-optin.performance.Padding
-"""""""""""""""""""""""""
+optin.performance.Padding (PaddingChecker)
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 Check for excessively padded structs.
 
+.. code-block:: objc
+
+ struct TestStruct {
+      int data1;   // 4 bytes
+      char data2;  // 1 byte
+      char padding[27];  // 27 bytes of padding
----------------
steakhal wrote:

This is a field, thus it shouldn't be counted as padding.

https://github.com/llvm/llvm-project/pull/86411


More information about the cfe-commits mailing list