[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 15 03:53:50 PDT 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 9451004987e84c2bc2f109dd56ceab3844505a7f 4330b70c2fde70010f1caabbf6562b61c701ef7e -- clang/test/CodeGen/debug-info-debug-info-type.cpp clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/Sema/SemaDeclAttr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 8d58968b7..294a73d2a 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -5922,9 +5922,11 @@ static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
if (type->isEnumeralType()) {
QualType BitfieldType = llvm::cast<FieldDecl>(D)->getType();
- QualType EnumUnderlyingType = type->getAs<EnumType>()->getDecl()->getIntegerType();
+ QualType EnumUnderlyingType =
+ type->getAs<EnumType>()->getDecl()->getIntegerType();
if (EnumUnderlyingType != BitfieldType) {
- S.Diag(AL.getLoc(), diag::warn_attribute_underlying_type_mismatch) << EnumUnderlyingType << type << BitfieldType;
+ S.Diag(AL.getLoc(), diag::warn_attribute_underlying_type_mismatch)
+ << EnumUnderlyingType << type << BitfieldType;
return;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69104
More information about the cfe-commits
mailing list