forked from qt-creator/qt-creator
CppEditor: More special rendering for string literals
Display prefixes and suffixes different from the actual string, like we already did for raw string literals. This uncovered some minor bugs in both lexer and highlighter: - Wrong length for a setFormat() call in highlightRawStringLiteral() - Missing check for user-defined literal in raw string literals - Missing check for user-defined literal in multi-line strings Fixes: QTCREATORBUG-28869 Change-Id: I018717c50ddc1d09c609556161c85dfb0cc29fab Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -27,3 +27,13 @@ struct ConversionFunction {
|
||||
};
|
||||
|
||||
template<typename T> concept NoConstraint = true;
|
||||
|
||||
const char16_t *operator ""_w(const char16_t *s, size_t) { return s; }
|
||||
const auto s = u"one"_w;
|
||||
const auto s2 = L"hello";
|
||||
const auto s3 = u8"hello";
|
||||
const auto s4 = U"hello";
|
||||
const auto s5 = uR"("o
|
||||
ne")"_w;
|
||||
const auto s6 = u"o\
|
||||
ne"_w;
|
||||
|
||||
Reference in New Issue
Block a user