mprobst added inline comments.

================
Comment at: lib/Format/FormatTokenLexer.cpp:259
@@ -241,1 +258,3 @@
       ++Offset; // Skip the escaped character.
+    if (Offset + 1 < Lex->getBuffer().end() && Offset[0] == '$' &&
+        Offset[1] == '{') {
----------------
Question by @ygao in the other diff:

> What happens if the '${' is immediately after a backslash (the if statement 
> above), should the '${' get escaped?

A template like `foo\${bar}` is the literal string `'foo\${bar}'`, i.e. the `\` 
acts as an escape for the `'$'` sign. I've added a test to validate that.


https://reviews.llvm.org/D22431



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to