[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / clang / test / CXX / lex / lex.literal / lex.string / p4.cpp
blobb73c8ed711a9fdce030f77bb341ee3bc27330d17
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 // expected-no-diagnostics
4 // NOTE: This file intentionally uses DOS-style line endings to test
5 // that we don't propagate them into string literals as per [lex.string]p4.
7 constexpr const char* p = R"(a\
9 c)";
11 static_assert(p[0] == 'a', "");
12 static_assert(p[1] == '\\', "");
13 static_assert(p[2] == '\n', "");
14 static_assert(p[3] == 'b', "");
15 static_assert(p[4] == '\n', "");
16 static_assert(p[5] == 'c', "");
17 static_assert(p[6] == '\0', "");