[clang-tools-extra] 43ca99a - Silence an illegal conversion warning in MSVC; NFC
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 28 05:08:56 PDT 2023
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 */) {
More information about the cfe-commits
mailing list