Skip to content

Commit a112df2

Browse files
[diagtool] Use StringRef::consume_front (NFC)
1 parent 3bf9e63 commit a112df2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/tools/diagtool/TreeView.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ int TreeView::run(unsigned int argc, char **argv, llvm::raw_ostream &out) {
160160
break;
161161
case 1:
162162
RootGroup = argv[0];
163-
if (RootGroup.starts_with("-W"))
164-
RootGroup = RootGroup.substr(2);
163+
RootGroup.consume_front("-W");
165164
if (RootGroup == "everything")
166165
ShowAll = true;
167166
// FIXME: Handle other special warning flags, like -pedantic.

0 commit comments

Comments
 (0)