[llvm] Allow DIBasicType (and others) to have a scope and location (PR #190217)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 07:38:24 PDT 2026
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 origin/main HEAD --extensions cpp,h -- llvm/include/llvm/IR/DIBuilder.h llvm/include/llvm/IR/DebugInfoMetadata.h llvm/lib/AsmParser/LLParser.cpp llvm/lib/Bitcode/Reader/MetadataLoader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/DIBuilder.cpp llvm/lib/IR/DebugInfoMetadata.cpp llvm/lib/IR/LLVMContextImpl.h llvm/unittests/IR/DebugInfoTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/IR/DebugInfoTest.cpp b/llvm/unittests/IR/DebugInfoTest.cpp
index 12abc91a7..fbf5a09b1 100644
--- a/llvm/unittests/IR/DebugInfoTest.cpp
+++ b/llvm/unittests/IR/DebugInfoTest.cpp
@@ -526,14 +526,16 @@ TEST(DIBuilder, FixedPointType) {
DIBuilder DIB(*M);
DIFixedPointType *Ty = DIB.createBinaryFixedPointType(
- {}, nullptr, 0, nullptr, 32, 0, dwarf::DW_ATE_signed_fixed, DINode::FlagZero, -4);
+ {}, nullptr, 0, nullptr, 32, 0, dwarf::DW_ATE_signed_fixed,
+ DINode::FlagZero, -4);
EXPECT_TRUE(Ty);
EXPECT_TRUE(Ty->getKind() == DIFixedPointType::FixedPointBinary);
EXPECT_TRUE(Ty->getFactor() == -4);
EXPECT_TRUE(Ty->getEncoding() == dwarf::DW_ATE_signed_fixed);
EXPECT_TRUE(Ty->getTag() == dwarf::DW_TAG_base_type);
- Ty = DIB.createDecimalFixedPointType({}, nullptr, 0, nullptr, 32, 0, dwarf::DW_ATE_unsigned_fixed,
+ Ty = DIB.createDecimalFixedPointType({}, nullptr, 0, nullptr, 32, 0,
+ dwarf::DW_ATE_unsigned_fixed,
DINode::FlagZero, -7);
EXPECT_TRUE(Ty);
EXPECT_TRUE(Ty->getKind() == DIFixedPointType::FixedPointDecimal);
@@ -543,7 +545,8 @@ TEST(DIBuilder, FixedPointType) {
APSInt Num(APInt(32, 1));
APSInt Denom(APInt(33, 72));
- Ty = DIB.createRationalFixedPointType({}, nullptr, 0, nullptr, 32, 0, dwarf::DW_ATE_unsigned_fixed,
+ Ty = DIB.createRationalFixedPointType({}, nullptr, 0, nullptr, 32, 0,
+ dwarf::DW_ATE_unsigned_fixed,
DINode::FlagZero, Num, Denom);
EXPECT_TRUE(Ty);
EXPECT_TRUE(Ty->getKind() == DIFixedPointType::FixedPointRational);
``````````
</details>
https://github.com/llvm/llvm-project/pull/190217
More information about the llvm-commits
mailing list