Summary: | MSVC does not support QStringLiteral with multi-string initializer | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Kåre Särs <kare.sars> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | All | ||
Latest Commit: | http://commits.kde.org/clazy/9c1458765dbdad21739cbe2b9154667657d2352e | Version Fixed In: | |
Sentry Crash Report: |
Description
Kåre Särs
2016-01-14 08:17:19 UTC
clazy has an msvc-compat compat option: export CLAZY_EXTRA_OPTIONS="qstring-uneeded-heap-allocations-msvc-compat" which will honour those cases. I'll turn on msvc-compat by default, and introduce a no-msvc-compat option instead. Git commit 04a6c6665e73da087cec7d66039830d2932305f7 by Sergio Martins. Committed on 14/01/2016 at 10:29. Pushed by smartins into branch 'master'. qstring-uneeded-heap-allocations: Rename msvc-compat to no-msvc-compat Meaning msvc-compat is the default and if you don't want it you should: export CLAZY_EXTRA_OPTIONS="qstring-uneeded-heap-allocations-no-msvc-compat" Helps stopping annoying our windows friends. Ignoring multi-string literals is not implemented yet, only ignoring list initialization. M +3 -3 checks/README-qstring-uneeded-heap-allocations M +3 -3 checks/qstringuneededheapallocations.cpp M +11 -4 tests/qstring-uneeded-heap-allocations/config.json M +2 -2 tests/qstring-uneeded-heap-allocations/main.cpp M +0 -2 tests/qstring-uneeded-heap-allocations/main.cpp.expected M +2 -2 tests/qstring-uneeded-heap-allocations/main.cpp_fixed.cpp.expected A +9 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp [License: UNKNOWN] * A +2 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp.expected A +9 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp_fixed.cpp.expected The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/clazy/04a6c6665e73da087cec7d66039830d2932305f7 Thanks :) Git commit 9c1458765dbdad21739cbe2b9154667657d2352e by Sergio Martins. Committed on 14/01/2016 at 23:49. Pushed by smartins into branch 'master'. qstring-uneeded-heap-allocations: Improve msvc compat Now we don't warn when using multi token literals like: QString s = "foo" "bar"; because MSVC is dumb M +19 -2 checks/qstringuneededheapallocations.cpp M +8 -8 tests/qstring-uneeded-heap-allocations/main.cpp M +0 -3 tests/qstring-uneeded-heap-allocations/main.cpp.expected M +8 -8 tests/qstring-uneeded-heap-allocations/main.cpp_fixed.cpp.expected M +13 -0 tests/qstring-uneeded-heap-allocations/msvc-compat.cpp M +13 -0 tests/qstring-uneeded-heap-allocations/msvc-compat.cpp_fixed.cpp.expected M +12 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp M +5 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp.expected M +12 -0 tests/qstring-uneeded-heap-allocations/no-msvc-compat.cpp_fixed.cpp.expected http://commits.kde.org/clazy/9c1458765dbdad21739cbe2b9154667657d2352e |