[Interest] Local QRegularExpression variables

Thiago Macieira thiago.macieira at intel.com
Mon Sep 25 17:38:33 CEST 2023


On Sunday, 24 September 2023 18:34:02 PDT NIkolai Marchenko wrote:
> Clang has warnings about using local regular expression objects and
> recommends creating them statically, but seemingly only when the pattern
> isn't QStringLiteral. Is it an oversight in clang's detection system or
> stringliteral'd regular expressions are so much cheaper that it doesn't
> deserve a warning?

The expense is in QRegularExpression, so it doesn't matter where the pattern 
came from. That's a limitation in the detection system then.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230925/4f57d023/attachment.bin>


More information about the Interest mailing list