Author: Aaron Ballman Date: 2023-08-28T08:06:03-04:00 New Revision: 43ca99a2516f107847271652a9be2cc694f1e6e5
URL: https://github.com/llvm/llvm-project/commit/43ca99a2516f107847271652a9be2cc694f1e6e5 DIFF: https://github.com/llvm/llvm-project/commit/43ca99a2516f107847271652a9be2cc694f1e6e5.diff LOG: 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. Added: Modified: clang-tools-extra/clang-tidy/GlobList.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/GlobList.cpp b/clang-tools-extra/clang-tidy/GlobList.cpp index 1d5b3a882fa648..4ff9d951110630 100644 --- a/clang-tools-extra/clang-tidy/GlobList.cpp +++ b/clang-tools-extra/clang-tidy/GlobList.cpp @@ -39,7 +39,7 @@ static llvm::Regex consumeGlob(StringRef &GlobList) { RegexText.push_back(C); } RegexText.push_back('$'); - return {RegexText}; + return {RegexText.str()}; } GlobList::GlobList(StringRef Globs, bool KeepNegativeGlobs /* =true */) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits