forked from OSchip/llvm-project
[clang-tidy] Ignore spaces between globs in the Checks option.
llvm-svn: 295303
This commit is contained in:
parent
7f82c87022
commit
762adef1a9
|
@ -119,6 +119,7 @@ ClangTidyError::ClangTidyError(StringRef CheckName,
|
|||
// Returns true if GlobList starts with the negative indicator ('-'), removes it
|
||||
// from the GlobList.
|
||||
static bool ConsumeNegativeIndicator(StringRef &GlobList) {
|
||||
GlobList = GlobList.trim(' ');
|
||||
if (GlobList.startswith("-")) {
|
||||
GlobList = GlobList.substr(1);
|
||||
return true;
|
||||
|
|
|
@ -67,7 +67,7 @@ TEST(GlobList, Simple) {
|
|||
}
|
||||
|
||||
TEST(GlobList, Complex) {
|
||||
GlobList Filter("*,-a.*,-b.*,a.1.*,-a.1.A.*,-..,-...,-..+,-*$,-*qwe*");
|
||||
GlobList Filter("*,-a.*, -b.*, a.1.* ,-a.1.A.*,-..,-...,-..+,-*$, -*qwe* ");
|
||||
|
||||
EXPECT_TRUE(Filter.contains("aaa"));
|
||||
EXPECT_TRUE(Filter.contains("qqq"));
|
||||
|
|
Loading…
Reference in New Issue