[PATCH] D125781: [llvm-debuginfo-analyzer] 06 - Warning and internal options
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 14:54:36 PDT 2022
probinson added inline comments.
================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp:43
+ else
+ // We found a duplicated.
+ Duplicate.emplace_back(Element, Scope, Iter->second);
----------------
================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp:54
+ };
+ if (const LVScopes *Scopes = Parent->getScopes())
+ for (LVScope *Scope : *Scopes) {
----------------
LLVM style wants braces for this multiline `if` statement.
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp:103
+ }
+ exit(0);
+ }
----------------
`exit` in a library function?
================
Comment at: llvm/unittests/DebugInfo/LogicalView/WarningInternalTest.cpp:94
+ T *Element = new (std::nothrow) T();
+ EXPECT_NE(Element, nullptr);
+ return Element;
----------------
Use `ASSERT_NE` so the test will abort if the allocation fails.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125781/new/
https://reviews.llvm.org/D125781
More information about the llvm-commits
mailing list