https://bugs.kde.org/show_bug.cgi?id=451686

            Bug ID: 451686
           Summary: false positive: Wclazy-use-static-qregularexpression
                    on dynamic QString
           Product: clazy
           Version: unspecified
          Platform: Ubuntu Packages
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-b...@kde.org
          Reporter: tstev...@gmail.com
                CC: smart...@kde.org
  Target Milestone: ---

Created attachment 147598
  --> https://bugs.kde.org/attachment.cgi?id=147598&action=edit
modified  clazy/tests/use-static-qregularexpression/main.cpp

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug
symbols.
See
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. export CLAZY_CHECKS=level0,level1

2. qmake -spec linux-clang "CONFIG+=debug" "QMAKE_CXX=clazy" atest.pro

3. make atest.o

OBSERVED RESULT
atest.cpp:121:5: warning: Don't create temporary QRegularExpression objects.
Use a static QRegularExpression object instead
[-Wclazy-use-static-qregularexpression]
    re3.match(text);


EXPECTED RESULT
no warning on this line


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu jammy
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 6.2.2

ADDITIONAL INFORMATION
clazy version 1.11

atest.pro:
CONFIG += c++17
SOURCES+=atest.cpp

atest.cpp, attached, is a modification of
clazy/tests/use-static-qregularexpression/main.cpp.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to