summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2017-04-05 18:10:42 +0000
committerNico Weber <nicolasweber@gmx.de>2017-04-05 18:10:42 +0000
commitdc06518ff4d4506eff4f49c508be3b6f8ca49675 (patch)
treee9f494678deadbeb4137e8928a1bfcf3027479b5 /clang/lib/Format
parent4eb2eccb247dd88381e58ac8172aef658118bfc1 (diff)
downloadbcm5719-llvm-dc06518ff4d4506eff4f49c508be3b6f8ca49675.tar.gz
bcm5719-llvm-dc06518ff4d4506eff4f49c508be3b6f8ca49675.zip
clang-format: Support formatting utf-8 character literals in C++11+ mode.
clang-format <<END auto c1 = u8'a'; auto c2 = u'a'; END Before: auto c1 = u8 'a'; auto c2 = u'a'; Now: auto c1 = u8'a'; auto c2 = u'a'; Patch from Denis Gladkikh <llvm@denis.gladkikh.email>! llvm-svn: 299574
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/Format.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 27f5849b394..0e2da71343d 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1894,6 +1894,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
LangOpts.CPlusPlus = 1;
LangOpts.CPlusPlus11 = Style.Standard == FormatStyle::LS_Cpp03 ? 0 : 1;
LangOpts.CPlusPlus14 = Style.Standard == FormatStyle::LS_Cpp03 ? 0 : 1;
+ LangOpts.CPlusPlus1z = Style.Standard == FormatStyle::LS_Cpp03 ? 0 : 1;
LangOpts.LineComment = 1;
bool AlternativeOperators = Style.isCpp();
LangOpts.CXXOperatorNames = AlternativeOperators ? 1 : 0;
OpenPOWER on IntegriCloud