[clang] Refactor ASTContext::getDeclAlign() (NFC) (PR #72977)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 03:28:46 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 7f740be4acddd8acf46796229c46117b735a9be8 90938183b35284cff65d100f3cb5284b816f28cc -- clang/lib/AST/ASTContext.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index d08b9072c0..50bb24631c 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1640,8 +1640,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const {
   bool IsPackedField = isa<FieldDecl>(D) &&
                        (D->hasAttr<PackedAttr>() ||
                         cast<FieldDecl>(D)->getParent()->hasAttr<PackedAttr>());
-  bool UseAlignAttrOnly =
-    isa<FieldDecl>(D) ? IsPackedField : AlignFromAttr;
+  bool UseAlignAttrOnly = isa<FieldDecl>(D) ? IsPackedField : AlignFromAttr;
   // If we're using the align attribute only, just ignore everything
   // else about the declaration and its type.
   if (UseAlignAttrOnly) {

``````````

</details>


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


More information about the cfe-commits mailing list