Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 6.0.0-beta1
-
None
-
a3af941adf (qt-creator/qt-creator/master) a3af941adf (qt-creator/qt-creator/qmlprojectstorage)
Description
Use defined literal operator with const char* string literals are not correctly syntax-highlighted in 6.0.0 beta1. It was correct in QtCreator5 and 4.x
What it looks like in 6 beta1 (notice the "length tst"_len in line 16)
What it looks like in 5
The reproducing code is attached below.
#include <cstring> #include <iostream> size_t operator""_len(const char *, size_t length) { return length; } size_t getLength(const char *str) { return std::strlen(str); } int main(int, char *[]) { const auto len = "length tst"_len; // This line shows the problem. const auto len2 = getLength("length tst"); len, len2; }