[Lldb-commits] [PATCH] D42620: [lldb] Silence signed <-> unsigned integer comparison warning
Kirill Bobyrev via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jan 28 03:55:57 PST 2018
omtcyfz created this revision.
omtcyfz added reviewers: davide, asmith.
`num_args` is unsigned integer, declared as below:
uint32_t num_args = arg_enum->getChildCount();
Comparison with the signed `arg_idx` produces a warning when compiled with -Wsign-compare flag, this patch addresses this simple issue without affecting any functionality.
https://reviews.llvm.org/D42620
Files:
source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
Index: source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
===================================================================
--- source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -270,7 +270,7 @@
// Drop last variadic argument.
if (is_variadic)
--num_args;
- for (int arg_idx = 0; arg_idx < num_args; arg_idx++) {
+ for (uint32_t arg_idx = 0; arg_idx < num_args; arg_idx++) {
auto arg = arg_enum->getChildAtIndex(arg_idx);
if (!arg)
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42620.131704.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180128/f0591e31/attachment.bin>
More information about the lldb-commits
mailing list