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; }
Attachments
For Gerrit Dashboard: QTCREATORBUG-26425 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
376751,2 | ClangCodeModel: Fix highlighting of user-defined string literals | 6.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
385273,4 | CppEditor: Fix highlighting of raw string literals | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |