We should exit when matching the '+' even if nothing was found to
prevent searching for all UNIT_MAX items.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146747
91177308-0d34-0410-b5e6-
96231b3b80d8
break;
}
if (II == IE) {
- if (D.Count == D.OneOrMoreCount && FoundOnce) {
- // We are only interested in at least one match and we found one.
+ if (D.Count == D.OneOrMoreCount) {
+ if (!FoundOnce)
+ LeftOnly.push_back(*I);
+ // We are only interested in at least one match, so exit the loop.
break;
}
// Not found.