[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 12:46:29 PDT 2024
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 3716a3c1bce4af81db6a95eee30e35b5b923e319 8fd0e9dcfd915367db1b66001daab47415406302 -- clang/lib/CodeGen/CGDebugInfo.cpp clang/test/CodeGen/debug-info-packed-struct.c clang/test/CodeGenCXX/debug-info-struct-align.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 591e42b196..681a475f9e 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -61,7 +61,7 @@ static uint32_t getTypeAlignIfRequired(const Type *Ty, const ASTContext &Ctx) {
if (TI.isAlignRequired())
return TI.Align;
- // MaxFieldAlignmentAttr is the attribute added to types
+ // MaxFieldAlignmentAttr is the attribute added to types
// declared after #pragma pack(n).
if (auto *Decl = Ty->getAsRecordDecl())
if (Decl->hasAttr<MaxFieldAlignmentAttr>())
``````````
</details>
https://github.com/llvm/llvm-project/pull/94673
More information about the cfe-commits
mailing list