[PATCH] D114292: [clang-tidy] Fix `altera-struct-pack-align` check for empty structs

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 26 00:33:02 PST 2021


whisperity requested changes to this revision.
whisperity added a comment.
This revision now requires changes to proceed.

I believe this is worth a note in the `ReleaseNotes.rst` file. People who might have disabled the check specifically for the reason outlined in the PR would get to know it's safe to reenable it.



================
Comment at: clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp:77
+      CharUnits::fromQuantity(std::max<clang::CharUnits::QuantityType>(
+          ceil((float)TotalBitSize / CharSize), 1));
   CharUnits MaxAlign = CharUnits::fromQuantity(
----------------
If we are changing this, can we make this more C++-y?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114292/new/

https://reviews.llvm.org/D114292



More information about the cfe-commits mailing list