From 18df6a9a78fc0b450bd37d4394c7422cd56ec12b Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 May 2016 10:36:51 -0400 Subject: Tests: Protect unicode literals from clang-format Cpp03 formatting Since CMake is written in C++98 any clang-format configuration must set `Standard` to `Cpp03` so that `A >` is not rewritten as `A>`. However, this will cause `U"foo"` to be rewritten as `U "foo"`. Add markup to turn clang-format off in the one place that the latter case occurs so that we do not need a separate `.clang-format` config file for it. Inspired-by: Daniel Pfeifer --- Tests/CompileFeatures/cxx_unicode_literals.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/CompileFeatures/cxx_unicode_literals.cpp b/Tests/CompileFeatures/cxx_unicode_literals.cpp index a7b7df0..7794c11 100644 --- a/Tests/CompileFeatures/cxx_unicode_literals.cpp +++ b/Tests/CompileFeatures/cxx_unicode_literals.cpp @@ -1,3 +1,5 @@ +/* clang-format off */ const char16_t lit_16[] = u"\u00DA"; const char32_t lit_32[] = U"\u00DA"; +/* clang-format on */ -- cgit v0.12