linux-packaging-mono/external/llvm-project/clang-tools-extra/test/clang-tidy/modernize-raw-string-literal-replace-shorter.cpp
Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

14 lines
640 B
C++

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