summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/HTMLRewrite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r--clang/lib/Rewrite/HTMLRewrite.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp
index 27f383f46ce..ad2491c8fbd 100644
--- a/clang/lib/Rewrite/HTMLRewrite.cpp
+++ b/clang/lib/Rewrite/HTMLRewrite.cpp
@@ -397,8 +397,15 @@ void html::SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP) {
HighlightRange(RB, TokOffs, TokOffs+TokLen, BufferStart,
"<span class='comment'>", "</span>");
break;
+ case tok::utf8_string_literal:
+ // Chop off the u part of u8 prefix
+ ++TokOffs;
+ --TokLen;
+ // FALL THROUGH to chop the 8
case tok::wide_string_literal:
- // Chop off the L prefix
+ case tok::utf16_string_literal:
+ case tok::utf32_string_literal:
+ // Chop off the L, u, U or 8 prefix
++TokOffs;
--TokLen;
// FALL THROUGH.
OpenPOWER on IntegriCloud