| 1 |
// RUN: %check_clang_tidy %s modernize-raw-string-literal %t |
| 2 |
|
| 3 |
// Don't replace these, because the raw literal would be longer. |
| 4 |
char const *const JustAQuote("quote:\'"); |
| 5 |
char const *const NeedDelimiter("\":)\""); |
| 6 |
|
| 7 |
char const *const ManyQuotes("quotes:\'\'\'\'"); |
| 8 |
// CHECK-MESSAGES: :[[@LINE-1]]:30: warning: {{.*}} can be written as a raw string literal |
| 9 |
// CHECK-FIXES: {{^}}char const *const ManyQuotes(R"(quotes:'''')");{{$}} |
| 10 |
|
| 11 |
char const *const LongOctal("\042\072\051\042"); |
| 12 |
// CHECK-MESSAGES: :[[@LINE-1]]:29: warning: {{.*}} can be written as a raw string literal |
| 13 |
// CHECK-FIXES: {{^}}char const *const LongOctal(R"lit(":)")lit");{{$}} |