vbvictor wrote:
Looking at it again, I think we can't enable this check for now in the codebase
because of patterns described in
https://github.com/llvm/llvm-project/issues/164896.
In our concrete example, we have:
```cpp
if (isCommonPrefixWithoutSomeCharacters(
Threshold, StringRef{S1PadE.begin(), BiggerLength},
StringRef{S2PadE.begin(), BiggerLength}))
return true;
SmallString<32> S1PadB{Str1}, S2PadB{Str2};
padStringAtBegin(S1PadB, BiggerLength);
padStringAtBegin(S2PadB, BiggerLength);
if (isCommonSuffixWithoutSomeCharacters(
Threshold, StringRef{S1PadB.begin(), BiggerLength},
StringRef{S2PadB.begin(), BiggerLength}))
return true;
return false;
```
To proceed further, we can make obvious improvements that don't look like
https://github.com/llvm/llvm-project/issues/164896.
https://github.com/llvm/llvm-project/pull/158706
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits