[llvm] [llvm-debuginfo-analyzer] Fix ODR violation in llvm::logicalview::LVObject (PR #140265)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 13 04:42:57 PDT 2025
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 HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/DebugInfo/LogicalView/Core/LVLine.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVRange.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVType.h llvm/lib/DebugInfo/LogicalView/Core/LVObject.cpp llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h
index 8510b0703..6f10c1777 100644
--- a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h
+++ b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h
@@ -190,9 +190,7 @@ protected:
virtual void printFileIndex(raw_ostream &OS, bool Full = true) const {}
public:
- LVObject() {
- incID();
- };
+ LVObject() { incID(); };
LVObject &operator=(const LVObject &) = delete;
virtual ~LVObject() = default;
@@ -311,9 +309,7 @@ public:
void dump() const { print(dbgs()); }
#endif
- uint64_t getID() const {
- return ID;
- }
+ uint64_t getID() const { return ID; }
};
} // end namespace logicalview
``````````
</details>
https://github.com/llvm/llvm-project/pull/140265
More information about the llvm-commits
mailing list