diff options
-rw-r--r-- | clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp index 9e1d397c6fc..8fbccbfb4fc 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -130,7 +130,7 @@ static bool ConsumeNegativeIndicator(StringRef &GlobList) { // Converts first glob from the comma-separated list of globs to Regex and // removes it and the trailing comma from the GlobList. static llvm::Regex ConsumeGlob(StringRef &GlobList) { - StringRef Glob = GlobList.substr(0, GlobList.find(',')); + StringRef Glob = GlobList.substr(0, GlobList.find(',')).trim(); GlobList = GlobList.substr(Glob.size() + 1); llvm::SmallString<128> RegexText("^"); StringRef MetaChars("()^$|*+?.[]\\{}"); |