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