Skip to content

Commit f3e07c8

Browse files
fodinabortstellar
authored andcommitted
[NFC] Correctly assert the indents for printEnumValHelpStr.
Only verify that there's no negative indent. Noted by @chapuni in https://reviews.llvm.org/D93494. Reviewed By: chapuni Differential Revision: https://reviews.llvm.org/D102021 (cherry picked from commit d9f2960)
1 parent 2db5d42 commit f3e07c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/CommandLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ void Option::printHelpStr(StringRef HelpStr, size_t Indent,
17291729
void Option::printEnumValHelpStr(StringRef HelpStr, size_t BaseIndent,
17301730
size_t FirstLineIndentedBy) {
17311731
const StringRef ValHelpPrefix = " ";
1732-
assert(BaseIndent >= FirstLineIndentedBy + ValHelpPrefix.size());
1732+
assert(BaseIndent >= FirstLineIndentedBy);
17331733
std::pair<StringRef, StringRef> Split = HelpStr.split('\n');
17341734
outs().indent(BaseIndent - FirstLineIndentedBy)
17351735
<< ArgHelpPrefix << ValHelpPrefix << Split.first << "\n";

0 commit comments

Comments
 (0)