summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-11 14:36:51 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-11 14:37:45 (GMT)
commit18df6a9a78fc0b450bd37d4394c7422cd56ec12b (patch)
treed34a4c067a0cfb215ff49886e577a2b14f7c1dfc /Tests/CompileFeatures
parenteb4f5104123a531bd49cb5834f3c66bb9e6aeeb6 (diff)
downloadCMake-18df6a9a78fc0b450bd37d4394c7422cd56ec12b.zip
CMake-18df6a9a78fc0b450bd37d4394c7422cd56ec12b.tar.gz
CMake-18df6a9a78fc0b450bd37d4394c7422cd56ec12b.tar.bz2
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<A<int> >` is not rewritten as `A<A<int>>`. 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 <daniel@pfeifer-mail.de>
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/cxx_unicode_literals.cpp2
1 files changed, 2 insertions, 0 deletions
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 */