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;
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;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits