Skip to content

Commit 43ca99a

Browse files
committed
Silence an illegal conversion warning in MSVC; NFC
The code previously required two levels of conversion, one from SmallString to StringRef and one from StringRef to Regex. This made the implicit conversion to StringRef be explicit instead.
1 parent aebe312 commit 43ca99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clang-tidy/GlobList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static llvm::Regex consumeGlob(StringRef &GlobList) {
3939
RegexText.push_back(C);
4040
}
4141
RegexText.push_back('$');
42-
return {RegexText};
42+
return {RegexText.str()};
4343
}
4444

4545
GlobList::GlobList(StringRef Globs, bool KeepNegativeGlobs /* =true */) {

0 commit comments

Comments
 (0)