[llvm] [libDebugInfo] Prevent infinite recursion in DWARFDie::getTypeSize() (PR #74681)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 16:37:23 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 13b88265088329decd15449e3b2461a6177174b2 ca18811cb33df3891086b40fe16fcc70824ba382 -- llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h llvm/lib/DebugInfo/DWARF/DWARFContext.cpp llvm/lib/DebugInfo/DWARF/DWARFDie.cpp llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index 7b9b25eaf5..9c62f7059c 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -1640,8 +1640,7 @@ TEST(DWARFDebugInfo, TestSelfRecursiveType) {
// Verify the number of compile units is correct.
uint32_t NumCUs = DwarfContext->getNumCompileUnits();
EXPECT_EQ(NumCUs, 1u);
- DWARFCompileUnit *U =
- cast<DWARFCompileUnit>(DwarfContext->getUnitAtIndex(0));
+ DWARFCompileUnit *U = cast<DWARFCompileUnit>(DwarfContext->getUnitAtIndex(0));
{
DWARFDie CUDie = U->getUnitDIE(false);
``````````
</details>
https://github.com/llvm/llvm-project/pull/74681
More information about the llvm-commits
mailing list